|
11 | 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | 12 | # See the License for the specific language governing permissions and |
13 | 13 | # limitations under the License. |
14 | | -""" Test for projectq.backends._awsbraket._awsbraket_boto3_client.py """ |
| 14 | +"""Test for projectq.backends._awsbraket._awsbraket_boto3_client.py""" |
15 | 15 |
|
16 | 16 | import pytest |
17 | 17 |
|
@@ -110,21 +110,15 @@ def test_retrieve(mocker, var_status, var_result, retrieve_setup): |
110 | 110 | _awsbraket_boto3_client.retrieve(credentials=creds, task_arn=arntask, num_retries=2) |
111 | 111 | print(exinfo.value) |
112 | 112 | if var_status == 'failed': |
113 | | - assert ( |
114 | | - str(exinfo.value) |
115 | | - == "Error while running the code: FAILED. \ |
| 113 | + assert str(exinfo.value) == "Error while running the code: FAILED. \ |
116 | 114 | The failure reason was: This is a failure reason." |
117 | | - ) |
118 | 115 |
|
119 | 116 | if var_status == 'cancelling': |
120 | 117 | assert str(exinfo.value) == "The job received a CANCEL operation: CANCELLING." |
121 | 118 | if var_status == 'other': |
122 | | - assert ( |
123 | | - str(exinfo.value) |
124 | | - == "Timeout. The Arn of your submitted job \ |
| 119 | + assert str(exinfo.value) == "Timeout. The Arn of your submitted job \ |
125 | 120 | is arn:aws:braket:us-east-1:id:taskuuid \ |
126 | 121 | and the status of the job is OTHER." |
127 | | - ) |
128 | 122 |
|
129 | 123 |
|
130 | 124 | # ============================================================================== |
@@ -155,7 +149,7 @@ def test_retrieve_devicetypes(mocker, retrieve_devicetypes_setup): |
155 | 149 |
|
156 | 150 | @has_boto3 |
157 | 151 | def test_send_too_many_qubits(mocker, send_too_many_setup): |
158 | | - (creds, s3_folder, search_value, device_value, info_too_much) = send_too_many_setup |
| 152 | + creds, s3_folder, search_value, device_value, info_too_much = send_too_many_setup |
159 | 153 |
|
160 | 154 | mock_boto3_client = mocker.MagicMock(spec=['search_devices', 'get_device']) |
161 | 155 | mock_boto3_client.search_devices.return_value = search_value |
@@ -222,21 +216,15 @@ def test_send_real_device_online_verbose(mocker, var_status, var_result, real_de |
222 | 216 | ) |
223 | 217 | print(exinfo.value) |
224 | 218 | if var_status == 'failed': |
225 | | - assert ( |
226 | | - str(exinfo.value) |
227 | | - == "Error while running the code: FAILED. The failure \ |
| 219 | + assert str(exinfo.value) == "Error while running the code: FAILED. The failure \ |
228 | 220 | reason was: This is a failure reason." |
229 | | - ) |
230 | 221 |
|
231 | 222 | if var_status == 'cancelling': |
232 | 223 | assert str(exinfo.value) == "The job received a CANCEL operation: CANCELLING." |
233 | 224 | if var_status == 'other': |
234 | | - assert ( |
235 | | - str(exinfo.value) |
236 | | - == "Timeout. The Arn of your submitted job \ |
| 225 | + assert str(exinfo.value) == "Timeout. The Arn of your submitted job \ |
237 | 226 | is arn:aws:braket:us-east-1:id:taskuuid \ |
238 | 227 | and the status of the job is OTHER." |
239 | | - ) |
240 | 228 |
|
241 | 229 |
|
242 | 230 | # ============================================================================== |
@@ -282,7 +270,7 @@ def test_send_that_errors_are_caught(mocker, var_error, send_that_error_setup): |
282 | 270 |
|
283 | 271 |
|
284 | 272 | @has_boto3 |
285 | | -@pytest.mark.parametrize("var_error", [('ResourceNotFoundException')]) |
| 273 | +@pytest.mark.parametrize("var_error", ['ResourceNotFoundException']) |
286 | 274 | def test_retrieve_error_arn_not_exist(mocker, var_error, arntask, creds): |
287 | 275 | mock_boto3_client = mocker.MagicMock(spec=['get_quantum_task']) |
288 | 276 | mock_boto3_client.get_quantum_task.side_effect = botocore.exceptions.ClientError( |
|
0 commit comments