@@ -352,29 +352,21 @@ def gwork(q):
352
352
assert re .search (r"TOTAL \d+ 0 100%" , last_line )
353
353
354
354
def test_bad_concurrency (self ):
355
- self .make_file ("prog.py" , "a = 1" )
356
- msg = "Unknown concurrency choices: nothing"
357
- with pytest .raises (ConfigError , match = msg ):
355
+ with pytest .raises (ConfigError , match = "Unknown concurrency choices: nothing" ):
358
356
self .command_line ("run --concurrency=nothing prog.py" )
359
357
360
358
def test_bad_concurrency_in_config (self ):
361
- self .make_file ("prog.py" , "a = 1" )
362
359
self .make_file (".coveragerc" , "[run]\n concurrency = nothing\n " )
363
- msg = "Unknown concurrency choices: nothing"
364
- with pytest .raises (ConfigError , match = msg ):
360
+ with pytest .raises (ConfigError , match = "Unknown concurrency choices: nothing" ):
365
361
self .command_line ("run prog.py" )
366
362
367
363
def test_no_multiple_light_concurrency (self ):
368
- self .make_file ("prog.py" , "a = 1" )
369
- msg = "Conflicting concurrency settings: eventlet, gevent"
370
- with pytest .raises (ConfigError , match = msg ):
364
+ with pytest .raises (ConfigError , match = "Conflicting concurrency settings: eventlet, gevent" ):
371
365
self .command_line ("run --concurrency=gevent,eventlet prog.py" )
372
366
373
367
def test_no_multiple_light_concurrency_in_config (self ):
374
- self .make_file ("prog.py" , "a = 1" )
375
368
self .make_file (".coveragerc" , "[run]\n concurrency = gevent, eventlet\n " )
376
- msg = "Conflicting concurrency settings: eventlet, gevent"
377
- with pytest .raises (ConfigError , match = msg ):
369
+ with pytest .raises (ConfigError , match = "Conflicting concurrency settings: eventlet, gevent" ):
378
370
self .command_line ("run prog.py" )
379
371
380
372
0 commit comments