Skip to content

Commit

Permalink
update test_jobs (#1046)
Browse files Browse the repository at this point in the history
  • Loading branch information
kt474 authored Aug 30, 2023
1 parent 469b9a6 commit 634235c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/integration/test_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def test_run_program_real_device(self, service):
self.assertEqual("foo", result)

@run_integration_test
@production_only
def test_run_program_cloud_no_backend(self, service):
"""Test running a cloud program with no backend."""

Expand All @@ -68,16 +69,17 @@ 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
@quantum_only
def test_run_program_log_level(self, service):
"""Test running with a custom log level."""
levels = ["INFO", "ERROR"]
for level in levels:
with self.subTest(level=level):
job = self._run_program(service, log_level=level)
job.wait_for_final_state()
self.assertTrue(job.logs())
if job.logs():
self.assertIn("Completed", job.logs())

@run_integration_test
@quantum_only
Expand Down Expand Up @@ -251,6 +253,7 @@ def test_wait_for_final_state(self, service):
self.assertEqual(JobStatus.DONE, job.status())

@run_integration_test
@production_only
def test_run_program_missing_backend_ibm_cloud(self, service):
"""Test running an ibm_cloud program with no backend."""
if self.dependencies.channel == "ibm_quantum":
Expand Down

0 comments on commit 634235c

Please sign in to comment.