Skip to content

Commit

Permalink
Update conftest.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nfarabullini authored Apr 5, 2024
1 parent 8b4722e commit 7c3721f
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions tests/next_tests/unit_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
raise e


import tests.next_tests
import next_tests


@pytest.fixture(
Expand All @@ -49,12 +49,7 @@ def lift_mode(request):

OPTIONAL_PROCESSORS = []
if dace_iterator:
OPTIONAL_PROCESSORS.append(
(
tests.next_tests.definitions.OptionalProgramBackendId.DACE_CPU,
True,
)
)
OPTIONAL_PROCESSORS.append((next_tests.definitions.OptionalProgramBackendId.DACE_CPU, True))
# TODO(havogt): update tests to use proper allocation
# OPTIONAL_PROCESSORS.append(
# pytest.param(
Expand All @@ -66,16 +61,16 @@ def lift_mode(request):
@pytest.fixture(
params=[
(None, True),
(tests.next_tests.definitions.ProgramBackendId.ROUNDTRIP, True),
(tests.next_tests.definitions.ProgramBackendId.DOUBLE_ROUNDTRIP, True),
(tests.next_tests.definitions.ProgramBackendId.GTFN_CPU, True),
(tests.next_tests.definitions.ProgramBackendId.GTFN_CPU_IMPERATIVE, True),
(tests.next_tests.definitions.ProgramBackendId.GTFN_CPU_WITH_TEMPORARIES, True),
(next_tests.definitions.ProgramBackendId.ROUNDTRIP, True),
(next_tests.definitions.ProgramBackendId.DOUBLE_ROUNDTRIP, True),
(next_tests.definitions.ProgramBackendId.GTFN_CPU, True),
(next_tests.definitions.ProgramBackendId.GTFN_CPU_IMPERATIVE, True),
(next_tests.definitions.ProgramBackendId.GTFN_CPU_WITH_TEMPORARIES, True),
# pytest.param((definitions.ProgramBackendId.GTFN_GPU, True), marks=pytest.mark.requires_gpu), # TODO(havogt): update tests to use proper allocation
(tests.next_tests.definitions.ProgramFormatterId.LISP_FORMATTER, False),
(tests.next_tests.definitions.ProgramFormatterId.ITIR_PRETTY_PRINTER, False),
(tests.next_tests.definitions.ProgramFormatterId.ITIR_TYPE_CHECKER, False),
(tests.next_tests.definitions.ProgramFormatterId.GTFN_CPP_FORMATTER, False),
(next_tests.definitions.ProgramFormatterId.LISP_FORMATTER, False),
(next_tests.definitions.ProgramFormatterId.ITIR_PRETTY_PRINTER, False),
(next_tests.definitions.ProgramFormatterId.ITIR_TYPE_CHECKER, False),
(next_tests.definitions.ProgramFormatterId.GTFN_CPP_FORMATTER, False),
]
+ OPTIONAL_PROCESSORS,
ids=lambda p: p[0].short_id() if p[0] is not None else "None",
Expand All @@ -96,7 +91,7 @@ def program_processor(request) -> tuple[ppi.ProgramProcessor, bool]:
if is_backend:
processor = processor.executor

for marker, skip_mark, msg in tests.next_tests.definitions.BACKEND_SKIP_TEST_MATRIX.get(
for marker, skip_mark, msg in next_tests.definitions.BACKEND_SKIP_TEST_MATRIX.get(
processor_id, []
):
if request.node.get_closest_marker(marker):
Expand Down

0 comments on commit 7c3721f

Please sign in to comment.