Skip to content

Commit

Permalink
Update test_backend_wrong_instance (#1259)
Browse files Browse the repository at this point in the history
* wip debug wrong instance test

* enable integration test

* use backend names instead of obj
  • Loading branch information
kt474 authored Dec 5, 2023
1 parent 40b3076 commit b264bf1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/integration/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ def test_backend_wrong_instance(self, service):

hgp_1 = hgps[0]
hgp_2 = hgps[1]
hgp_1_backends = service.backends(instance=hgp_1)
hgp_2_backends = service.backends(instance=hgp_2)
unique_hgp = list(
hgp_1_backends = [backend.name for backend in service.backends(instance=hgp_1)]
hgp_2_backends = [backend.name for backend in service.backends(instance=hgp_2)]
unique_backends_list = list(
set(hgp_2_backends) - set(hgp_1_backends)
) # get differences between the two lists
if unique_hgp:
unique_backend = unique_hgp[0]
if unique_backends_list:
unique_backend = unique_backends_list[0]
with self.assertRaises(QiskitBackendNotFoundError):
service.backend(unique_backend.name, instance=hgp_1)
service.backend(unique_backend, instance=hgp_1)

@run_integration_test
@quantum_only
Expand Down

0 comments on commit b264bf1

Please sign in to comment.