Skip to content

Commit b282691

Browse files
authored
[ENH] in test_parallelize_simple_loop, use name of backend as fixture name (#170)
Ensures that in `test_parallelize_simple_loop`, the name of backend is used as fixture name. This facilitates diagnosis, e.g., if a specific backend is triggering the failure, such as in #169
1 parent c857212 commit b282691

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/hyperactive/utils/tests/test_parallel.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ def square(x, **kwargs):
4242
return x**2
4343

4444

45-
@pytest.mark.parametrize("fixture", _get_parallel_test_fixtures())
45+
PARALLEL_TEST_FIXTURES = _get_parallel_test_fixtures()
46+
PTF_NAMES = [f["backend"] for f in PARALLEL_TEST_FIXTURES]
47+
48+
49+
@pytest.mark.parametrize("fixture", PARALLEL_TEST_FIXTURES, ids=PTF_NAMES)
4650
def test_parallelize_simple_loop(fixture):
4751
"""Test that parallelize works with a simple function and fixture."""
4852
backend = fixture["backend"]

0 commit comments

Comments
 (0)