File tree Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -61,17 +61,17 @@ def test_create_task_via_reservation_arn_on_simulator(reservation_arn):
6161 reason = "Python version mismatch" ,
6262)
6363def test_create_job_with_decorator_via_invalid_reservation_arn (reservation_arn ):
64- with pytest . raises ( ClientError , match = "Reservation arn is invalid" ) :
65-
66- @hybrid_job (
67- device = Devices .IQM .Garnet ,
68- reservation_arn = reservation_arn ,
69- )
70- def hello_job ():
71- device = AwsDevice (get_job_device_arn ())
72- bell = Circuit ().h (0 ).cnot (0 , 1 )
73- task = device .run (bell , shots = 10 )
74- measurements = task .result ().measurements
75- return measurements
76-
77- hello_job ()
64+ if AwsDevice ( Devices . IQM . Garnet ). status == "ONLINE" :
65+ with pytest . raises ( ClientError , match = "Reservation arn is invalid" ):
66+ @hybrid_job (
67+ device = Devices .IQM .Garnet ,
68+ reservation_arn = reservation_arn ,
69+ )
70+ def hello_job ():
71+ device = AwsDevice (get_job_device_arn ())
72+ bell = Circuit ().h (0 ).cnot (0 , 1 )
73+ task = device .run (bell , shots = 10 )
74+ measurements = task .result ().measurements
75+ return measurements
76+
77+ hello_job ()
You can’t perform that action at this time.
0 commit comments