diff --git a/arraycontext/pytest.py b/arraycontext/pytest.py index 6f63a6cfdc555bf423fefba434dfc56fc2c1e03a..e9614e1dc6539d750e2d286b5c991e93eeb883d7 100644 --- a/arraycontext/pytest.py +++ b/arraycontext/pytest.py @@ -251,6 +251,9 @@ def pytest_generate_tests_for_array_contexts( # }}} + # Sort the actx's so that parallel pytest works + arg_value_tuples = sorted(arg_value_tuples, key=lambda x: x.__str__()) + metafunc.parametrize(arg_names, arg_value_tuples, ids=ids) return inner diff --git a/test/test_arraycontext.py b/test/test_arraycontext.py index e9d9d5eb244238cfc32b2d84b776085b4de9ac38..1bfaef431e28552a76bbb72582507c8381795aed 100644 --- a/test/test_arraycontext.py +++ b/test/test_arraycontext.py @@ -36,7 +36,7 @@ from arraycontext import ( ArrayContainer,) from arraycontext import ( # noqa: F401 pytest_generate_tests_for_array_contexts, - _acf) + ) from arraycontext.pytest import (_PytestPyOpenCLArrayContextFactoryWithClass, _PytestPytatoPyOpenCLArrayContextFactory) diff --git a/test/test_utils.py b/test/test_utils.py index e40dda193a7795559ff6070bfd2a85b2e8060b15..90b37528ff5da449d6fcefd6d80d6dc26ca90e4b 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -25,7 +25,7 @@ THE SOFTWARE. from arraycontext import ( # noqa: F401 pytest_generate_tests_for_array_contexts, - _acf) + ) import logging logger = logging.getLogger(__name__)