From d4f69d7e69808f9134e41d6cce51ca40e80fd427 Mon Sep 17 00:00:00 2001 From: Yi Gu Date: Fri, 8 Nov 2024 14:04:16 -0800 Subject: [PATCH 1/2] disable QCI tests --- azure-quantum/tests/unit/test_qiskit.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/azure-quantum/tests/unit/test_qiskit.py b/azure-quantum/tests/unit/test_qiskit.py index 43acc989..b1ae1356 100644 --- a/azure-quantum/tests/unit/test_qiskit.py +++ b/azure-quantum/tests/unit/test_qiskit.py @@ -1634,8 +1634,8 @@ def test_qiskit_get_rigetti_qpu_targets(self): self.assertEqual("qir.v1", config.azure["input_data_format"]) self.assertEqual(MICROSOFT_OUTPUT_DATA_FORMAT_V2, backend._get_output_data_format()) - @pytest.mark.qci - @pytest.mark.live_test + #@pytest.mark.qci + #@pytest.mark.live_test def test_qiskit_submit_to_qci(self): workspace = self.create_workspace() provider = AzureQuantumProvider(workspace=workspace) @@ -1677,8 +1677,8 @@ def test_qiskit_submit_to_qci(self): counts = result.get_counts() self.assertEqual(counts, result.data()["counts"]) - @pytest.mark.qci - @pytest.mark.live_test + #@pytest.mark.qci + #@pytest.mark.live_test def test_qiskit_submit_to_qci_with_default_shots(self): workspace = self.create_workspace() provider = AzureQuantumProvider(workspace=workspace) @@ -1689,8 +1689,8 @@ def test_qiskit_submit_to_qci_with_default_shots(self): self._qiskit_wait_to_complete(qiskit_job, provider) self.assertEqual(qiskit_job._azure_job.details.input_params["shots"], 500) - @pytest.mark.qci - @pytest.mark.live_test + #@pytest.mark.qci + #@pytest.mark.live_test def test_qiskit_submit_to_qci_with_deprecated_count_param(self): """ Verify that a warning message is printed when the 'count' option is specified. @@ -1711,8 +1711,8 @@ def test_qiskit_submit_to_qci_with_deprecated_count_param(self): self._qiskit_wait_to_complete(qiskit_job, provider) self.assertEqual(qiskit_job._azure_job.details.input_params["shots"], shots) - @pytest.mark.qci - @pytest.mark.live_test + #@pytest.mark.qci + #@pytest.mark.live_test def test_qiskit_get_qci_qpu_targets(self): workspace = self.create_workspace() provider = AzureQuantumProvider(workspace=workspace) From 620b855cd2086016e0a6f238a27eb5954f32e679 Mon Sep 17 00:00:00 2001 From: Yi Gu Date: Thu, 14 Nov 2024 11:23:41 -0800 Subject: [PATCH 2/2] use skip to skip tests --- azure-quantum/tests/unit/test_qiskit.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/azure-quantum/tests/unit/test_qiskit.py b/azure-quantum/tests/unit/test_qiskit.py index b1ae1356..7c8f4398 100644 --- a/azure-quantum/tests/unit/test_qiskit.py +++ b/azure-quantum/tests/unit/test_qiskit.py @@ -1634,8 +1634,9 @@ def test_qiskit_get_rigetti_qpu_targets(self): self.assertEqual("qir.v1", config.azure["input_data_format"]) self.assertEqual(MICROSOFT_OUTPUT_DATA_FORMAT_V2, backend._get_output_data_format()) - #@pytest.mark.qci - #@pytest.mark.live_test + @pytest.mark.skip("Skipping tests against QCI's unavailable targets") + @pytest.mark.qci + @pytest.mark.live_test def test_qiskit_submit_to_qci(self): workspace = self.create_workspace() provider = AzureQuantumProvider(workspace=workspace) @@ -1677,8 +1678,9 @@ def test_qiskit_submit_to_qci(self): counts = result.get_counts() self.assertEqual(counts, result.data()["counts"]) - #@pytest.mark.qci - #@pytest.mark.live_test + @pytest.mark.skip("Skipping tests against QCI's unavailable targets") + @pytest.mark.qci + @pytest.mark.live_test def test_qiskit_submit_to_qci_with_default_shots(self): workspace = self.create_workspace() provider = AzureQuantumProvider(workspace=workspace) @@ -1689,8 +1691,9 @@ def test_qiskit_submit_to_qci_with_default_shots(self): self._qiskit_wait_to_complete(qiskit_job, provider) self.assertEqual(qiskit_job._azure_job.details.input_params["shots"], 500) - #@pytest.mark.qci - #@pytest.mark.live_test + @pytest.mark.skip("Skipping tests against QCI's unavailable targets") + @pytest.mark.qci + @pytest.mark.live_test def test_qiskit_submit_to_qci_with_deprecated_count_param(self): """ Verify that a warning message is printed when the 'count' option is specified. @@ -1711,8 +1714,9 @@ def test_qiskit_submit_to_qci_with_deprecated_count_param(self): self._qiskit_wait_to_complete(qiskit_job, provider) self.assertEqual(qiskit_job._azure_job.details.input_params["shots"], shots) - #@pytest.mark.qci - #@pytest.mark.live_test + @pytest.mark.skip("Skipping tests against QCI's unavailable targets") + @pytest.mark.qci + @pytest.mark.live_test def test_qiskit_get_qci_qpu_targets(self): workspace = self.create_workspace() provider = AzureQuantumProvider(workspace=workspace)