Skip to content

Commit

Permalink
✅adjusted tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nquetschlich committed Apr 28, 2024
1 parent 727f5dd commit 9f6d0e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_pretrained_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
from mqt.predictor.evaluation import evaluate_sample_circuit

# only run test when executed on GitHub runner
IN_GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS") == "true"
EXECUTION_FLAG = os.getenv("RUN_PREGENERATED_TESTS") == "true"


@pytest.mark.skipif(not os.environ["RUN_PREGENERATED_TESTS"], reason="Only run this test on GitHub runner on demand.")
@pytest.mark.skipif(not EXECUTION_FLAG, reason="Only run this test on GitHub runner on demand.")
@pytest.mark.parametrize(
"figure_of_merit",
["expected_fidelity", "critical_depth"],
Expand All @@ -28,7 +28,7 @@ def test_qcompile_with_pretrained_models(figure_of_merit: reward.figure_of_merit
assert compilation_information is not None


@pytest.mark.skipif(not os.environ["RUN_PREGENERATED_TESTS"], reason="Only run this test on GitHub runner on demand.")
@pytest.mark.skipif(not EXECUTION_FLAG, reason="Only run this test on GitHub runner on demand.")
def test_qcompile() -> None:
qc = get_benchmark("ghz", 1, 5)
qc_compiled, _compilation_information, quantum_device = qcompile(qc)
Expand All @@ -37,7 +37,7 @@ def test_qcompile() -> None:
assert len(qc_compiled) > 0


@pytest.mark.skipif(not os.environ["RUN_PREGENERATED_TESTS"], reason="Only run this test on GitHub runner on demand.")
@pytest.mark.skipif(not EXECUTION_FLAG, reason="Only run this test on GitHub runner on demand.")
def test_evaluate_sample_circuit() -> None:
qc = get_benchmark("ghz", 1, 3)
filename = "test_3.qasm"
Expand Down

0 comments on commit 9f6d0e0

Please sign in to comment.