diff --git a/test/decorators.py b/test/decorators.py index 40dbd08ae..be43830ca 100644 --- a/test/decorators.py +++ b/test/decorators.py @@ -28,7 +28,7 @@ def production_only(func): @wraps(func) def _wrapper(self, *args, **kwargs): - if "dev" in self.dependencies.url: + if "dev" in self.dependencies.url or "test" in self.dependencies.url: raise SkipTest(f"Skipping integration test. {self} is not supported on staging.") func(self, *args, **kwargs) @@ -127,6 +127,7 @@ def _wrapper(self, *args, **kwargs): service = None if init_service: service = QiskitRuntimeService( + instance=instance, channel=channel, token=token, url=url, diff --git a/test/integration/test_job.py b/test/integration/test_job.py index 4c568e4b4..0beb0f435 100644 --- a/test/integration/test_job.py +++ b/test/integration/test_job.py @@ -68,6 +68,7 @@ def test_run_program_cloud_no_backend(self, service): job = self._run_program(service, backend="") self.assertTrue(job.backend(), f"Job {job.job_id()} has no backend.") + @production_only @run_integration_test def test_run_program_log_level(self, service): """Test running with a custom log level.""" diff --git a/test/integration/test_options.py b/test/integration/test_options.py index d81cdf4b5..76ba3b386 100644 --- a/test/integration/test_options.py +++ b/test/integration/test_options.py @@ -20,7 +20,7 @@ from qiskit_ibm_runtime.exceptions import RuntimeJobFailureError from ..ibm_test_case import IBMIntegrationTestCase -from ..decorators import run_integration_test +from ..decorators import run_integration_test, production_only class TestIntegrationOptions(IBMIntegrationTestCase): @@ -114,6 +114,7 @@ def test_unsupported_input_combinations(self, service): inst.run(circ, observables=obs) self.assertIn("a coupling map is required.", str(exc.exception)) + @production_only @run_integration_test def test_all_resilience_levels(self, service): """Test that all resilience_levels are recognized correctly