@@ -201,10 +201,10 @@ def test_app_packages_invalid_requires(
201
201
# Unfortunately, no way to tell the difference between "offline" and
202
202
# "your requirements are invalid"; pip returns status code 1 for all
203
203
# failures.
204
- create_command .tools [
205
- myapp
206
- ]. app_context . run . side_effect = subprocess . CalledProcessError (
207
- cmd = [ "python" , "-u" , "-m" , "pip" , "..." ], returncode = 1
204
+ create_command .tools [myapp ]. app_context . run . side_effect = (
205
+ subprocess . CalledProcessError (
206
+ cmd = [ "python" , "-u" , "-m" , "pip" , "..." ], returncode = 1
207
+ )
208
208
)
209
209
210
210
with pytest .raises (RequirementsInstallError ):
@@ -248,10 +248,10 @@ def test_app_packages_offline(
248
248
# Unfortunately, no way to tell the difference between "offline" and
249
249
# "your requirements are invalid"; pip returns status code 1 for all
250
250
# failures.
251
- create_command .tools [
252
- myapp
253
- ]. app_context . run . side_effect = subprocess . CalledProcessError (
254
- cmd = [ "python" , "-u" , "-m" , "pip" , "..." ], returncode = 1
251
+ create_command .tools [myapp ]. app_context . run . side_effect = (
252
+ subprocess . CalledProcessError (
253
+ cmd = [ "python" , "-u" , "-m" , "pip" , "..." ], returncode = 1
254
+ )
255
255
)
256
256
257
257
with pytest .raises (RequirementsInstallError ):
@@ -297,10 +297,8 @@ def test_app_packages_install_requirements(
297
297
myapp .requires = ["first" , "second" , "third" ]
298
298
299
299
# The side effect of calling pip is creating installation artefacts
300
- create_command .tools [
301
- myapp
302
- ].app_context .run .side_effect = create_installation_artefacts (
303
- app_packages_path , myapp .requires
300
+ create_command .tools [myapp ].app_context .run .side_effect = (
301
+ create_installation_artefacts (app_packages_path , myapp .requires )
304
302
)
305
303
306
304
# Install the requirements
@@ -356,10 +354,8 @@ def test_app_packages_replace_existing_requirements(
356
354
myapp .requires = ["first" , "second" , "third" ]
357
355
358
356
# The side effect of calling pip is creating installation artefacts
359
- create_command .tools [
360
- myapp
361
- ].app_context .run .side_effect = create_installation_artefacts (
362
- app_packages_path , myapp .requires
357
+ create_command .tools [myapp ].app_context .run .side_effect = (
358
+ create_installation_artefacts (app_packages_path , myapp .requires )
363
359
)
364
360
365
361
# Install the requirements
0 commit comments