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 a13dd8b commit 727f5dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/pretrained_model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Pre-Trained Models
on:
workflow_dispatch:

env:
RUN_PREGENERATED_TESTS: true

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
Expand Down
6 changes: 3 additions & 3 deletions tests/test_pretrained_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
IN_GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS") == "true"


@pytest.mark.skip(reason=".")
@pytest.mark.skipif(not os.environ["RUN_PREGENERATED_TESTS"], 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.skip(reason=".")
@pytest.mark.skipif(not os.environ["RUN_PREGENERATED_TESTS"], 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.skip(reason=".")
@pytest.mark.skipif(not os.environ["RUN_PREGENERATED_TESTS"], 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 727f5dd

Please sign in to comment.