Skip to content

Commit 4eef601

Browse files
Move batched test case out of parametrized directory
1 parent e6b6c62 commit 4eef601

8 files changed

Lines changed: 4 additions & 8 deletions

File tree

File renamed without changes.

tests/testutils/_primer/cases/batched/expected_comparator.json renamed to tests/testutils/_primer/batched_cases/expected_comparator.json

File renamed without changes.

tests/testutils/_primer/cases/batched/main_batch0.json renamed to tests/testutils/_primer/batched_cases/main_batch0.json

File renamed without changes.

tests/testutils/_primer/cases/batched/main_batch1.json renamed to tests/testutils/_primer/batched_cases/main_batch1.json

File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/testutils/_primer/test_comparator.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@
1414

1515
@pytest.mark.parametrize(
1616
"directory",
17-
[
18-
pytest.param(p, id=p.name)
19-
for p in CASES_PATH.iterdir()
20-
if p.is_dir() and p.name != "batched" # tested separately
21-
],
17+
[pytest.param(p, id=p.name) for p in CASES_PATH.iterdir() if p.is_dir()],
2218
)
2319
def test_comparator(directory: Path) -> None:
2420
"""Test Comparator with each fixture directory."""
@@ -33,7 +29,7 @@ def test_comparator(directory: Path) -> None:
3329

3430

3531
def test_comparator_batched() -> None:
36-
fixture = CASES_PATH / "batched"
32+
fixture = Path(__file__).parent / "batched_cases"
3733
comparator = Comparator(
3834
str(fixture / "main_BATCHIDX.json"),
3935
str(fixture / "pr_BATCHIDX.json"),

tests/testutils/_primer/test_primer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class TestPrimer:
5454
[
5555
pytest.param(p, id=str(p.relative_to(CASES_PATH)))
5656
for p in CASES_PATH.iterdir()
57-
if p.is_dir() and p.name != "batched" # tested separately
57+
if p.is_dir()
5858
],
5959
)
6060
def test_compare(self, directory: Path) -> None:
@@ -65,7 +65,7 @@ def test_compare(self, directory: Path) -> None:
6565
self.__assert_expected(directory)
6666

6767
def test_compare_batched(self) -> None:
68-
fixture = CASES_PATH / "batched"
68+
fixture = HERE / "batched_cases"
6969
self.__assert_expected(
7070
fixture,
7171
fixture / "main_BATCHIDX.json",

0 commit comments

Comments
 (0)