@@ -302,7 +302,7 @@ def test_run(self, cli_runner, project):
302
302
303
303
with chdir (project .path ):
304
304
result = cli_runner .invoke (cli .run )
305
- assert re .search ('Linting.+?\[SUCCESS]' , result .output )
305
+ assert re .search (r 'Linting.+?\[SUCCESS]' , result .output )
306
306
assert not result .exception
307
307
assert result .exit_code == 0
308
308
@@ -319,7 +319,7 @@ def test_fails(self, cli_runner, project):
319
319
320
320
with chdir (project .path ):
321
321
result = cli_runner .invoke (cli .run )
322
- assert re .search ('Linting.+?\[FAILURE]' , result .output )
322
+ assert re .search (r 'Linting.+?\[FAILURE]' , result .output )
323
323
assert result .exception
324
324
assert result .exit_code == 2
325
325
@@ -329,7 +329,7 @@ def test_action(self, cli_runner, project):
329
329
330
330
with chdir (project .path ):
331
331
result = cli_runner .invoke (cli .run , ['-a' , 'lint' ])
332
- assert re .search ('Linting.+?\[SUCCESS]' , result .output )
332
+ assert re .search (r 'Linting.+?\[SUCCESS]' , result .output )
333
333
assert not result .exception
334
334
assert result .exit_code == 0
335
335
@@ -340,8 +340,8 @@ def test_action_with_fix(self, cli_runner, project):
340
340
341
341
with chdir (project .path ):
342
342
result = cli_runner .invoke (cli .run , ['-a' , 'lint' , '--fix' ])
343
- assert re .search ('Linting.+?\[SUCCESS]' , result .output )
344
- assert re .search ('Modified files:.+?pass.py.+?<- Linting' , result .output , flags = re .DOTALL )
343
+ assert re .search (r 'Linting.+?\[SUCCESS]' , result .output )
344
+ assert re .search (r 'Modified files:.+?pass.py.+?<- Linting' , result .output , flags = re .DOTALL )
345
345
assert not result .exception
346
346
assert result .exit_code == 0
347
347
assert project .read ('pass.py' ) == 'FIXED'
@@ -354,8 +354,8 @@ def test_action_stage_modified_files(self, cli_runner, project):
354
354
355
355
with chdir (project .path ):
356
356
result = cli_runner .invoke (cli .run , ['-a' , 'lint' , '--fix' , '--stage-modified-files' ])
357
- assert re .search ('Linting.+?\[SUCCESS]' , result .output )
358
- assert re .search ('Modified files:.+?pass.py.+?<- Linting' , result .output , flags = re .DOTALL )
357
+ assert re .search (r 'Linting.+?\[SUCCESS]' , result .output )
358
+ assert re .search (r 'Modified files:.+?pass.py.+?<- Linting' , result .output , flags = re .DOTALL )
359
359
assert not result .exception
360
360
assert result .exit_code == 0
361
361
assert project .read ('pass.py' ) == 'FIXED'
@@ -367,7 +367,7 @@ def test_action_fails(self, cli_runner, project):
367
367
368
368
with chdir (project .path ):
369
369
result = cli_runner .invoke (cli .run , ['-a' , 'lint' ])
370
- assert re .search ('Linting.+?\[FAILURE]' , result .output )
370
+ assert re .search (r 'Linting.+?\[FAILURE]' , result .output )
371
371
assert result .exception
372
372
assert result .exit_code == 2
373
373
@@ -398,7 +398,7 @@ def test_plugin(self, cli_runner, project):
398
398
399
399
with chdir (project .path ):
400
400
result = cli_runner .invoke (cli .run , ['-p' , 'simple' ])
401
- assert re .search ('simple.+?\[SUCCESS]' , result .output )
401
+ assert re .search (r 'simple.+?\[SUCCESS]' , result .output )
402
402
assert not result .exception
403
403
assert result .exit_code == 0
404
404
@@ -408,7 +408,7 @@ def test_plugin_fails(self, cli_runner, project, mock_plugin):
408
408
409
409
with chdir (project .path ):
410
410
result = cli_runner .invoke (cli .run , ['-p' , 'simple' ])
411
- assert re .search ('simple.+?\[FAILURE]' , result .output )
411
+ assert re .search (r 'simple.+?\[FAILURE]' , result .output )
412
412
assert result .exception
413
413
assert result .exit_code == 2
414
414
@@ -429,7 +429,7 @@ def test_on_file(self, cli_runner, project):
429
429
430
430
with chdir (project .path ):
431
431
result = cli_runner .invoke (cli .run , ['pass.py' ])
432
- assert re .search ('Linting.+?\[SUCCESS]' , result .output )
432
+ assert re .search (r 'Linting.+?\[SUCCESS]' , result .output )
433
433
assert not result .exception
434
434
assert result .exit_code == 0
435
435
@@ -439,7 +439,7 @@ def test_on_file_fail(self, cli_runner, project):
439
439
440
440
with chdir (project .path ):
441
441
result = cli_runner .invoke (cli .run , ['fail.py' ])
442
- assert re .search ('Linting.+?\[FAILURE]' , result .output )
442
+ assert re .search (r 'Linting.+?\[FAILURE]' , result .output )
443
443
assert result .exception
444
444
assert result .exit_code == 2
445
445
@@ -449,7 +449,7 @@ def test_dir(self, cli_runner, project):
449
449
450
450
with chdir (project .path ):
451
451
result = cli_runner .invoke (cli .run , ['dir' ])
452
- assert re .search ('Linting.+?\[SUCCESS]' , result .output )
452
+ assert re .search (r 'Linting.+?\[SUCCESS]' , result .output )
453
453
assert not result .exception
454
454
assert result .exit_code == 0
455
455
@@ -459,7 +459,7 @@ def test_dir_fail(self, cli_runner, project):
459
459
460
460
with chdir (project .path ):
461
461
result = cli_runner .invoke (cli .run , ['dir' ])
462
- assert re .search ('Linting.+?\[FAILURE]' , result .output )
462
+ assert re .search (r 'Linting.+?\[FAILURE]' , result .output )
463
463
assert result .exception
464
464
assert result .exit_code == 2
465
465
@@ -469,7 +469,7 @@ def test_file(self, cli_runner, project):
469
469
470
470
with chdir (project .path ):
471
471
result = cli_runner .invoke (cli .run , ['pass.py' ])
472
- assert re .search ('Linting.+?\[SUCCESS]' , result .output )
472
+ assert re .search (r 'Linting.+?\[SUCCESS]' , result .output )
473
473
assert not result .exception
474
474
assert result .exit_code == 0
475
475
@@ -479,7 +479,7 @@ def test_file_fail(self, cli_runner, project):
479
479
480
480
with chdir (project .path ):
481
481
result = cli_runner .invoke (cli .run , ['fail.py' ])
482
- assert re .search ('Linting.+?\[FAILURE]' , result .output )
482
+ assert re .search (r 'Linting.+?\[FAILURE]' , result .output )
483
483
assert result .exception
484
484
assert result .exit_code == 2
485
485
@@ -492,7 +492,7 @@ def test_include_untracked(self, cli_runner, project):
492
492
assert result .exit_code == 0
493
493
494
494
result = cli_runner .invoke (cli .run , ['--include-untracked' ])
495
- assert re .search ('Linting.+?\[FAILURE]' , result .output )
495
+ assert re .search (r 'Linting.+?\[FAILURE]' , result .output )
496
496
assert result .exception
497
497
assert result .exit_code == 2
498
498
@@ -508,7 +508,7 @@ def test_include_unstaged(self, cli_runner, project):
508
508
assert result .exit_code == 0
509
509
510
510
result = cli_runner .invoke (cli .run , ['--include-unstaged' ])
511
- assert re .search ('Linting.+?\[FAILURE]' , result .output )
511
+ assert re .search (r 'Linting.+?\[FAILURE]' , result .output )
512
512
assert result .exception
513
513
assert result .exit_code == 2
514
514
@@ -520,7 +520,7 @@ def test_unstaged_changes(self, cli_runner, project):
520
520
with chdir (project .path ):
521
521
result = cli_runner .invoke (cli .run )
522
522
assert 'You have unstaged changes.' in result .output
523
- assert re .search ('Linting.+?\[FAILURE]' , result .output )
523
+ assert re .search (r 'Linting.+?\[FAILURE]' , result .output )
524
524
assert result .exception
525
525
assert result .exit_code == 2
526
526
assert project .read ('pass.py' ) == 'x'
@@ -533,7 +533,7 @@ def test_include_unstaged_changes(self, cli_runner, project):
533
533
with chdir (project .path ):
534
534
result = cli_runner .invoke (cli .run , ['--include-unstaged-changes' ])
535
535
assert 'You have unstaged changes.' in result .output
536
- assert re .search ('Linting.+?\[SUCCESS]' , result .output )
536
+ assert re .search (r 'Linting.+?\[SUCCESS]' , result .output )
537
537
assert not result .exception
538
538
assert result .exit_code == 0
539
539
assert project .read ('pass.py' ) == 'x'
@@ -545,7 +545,7 @@ def test_use_tracked_files(self, cli_runner, project):
545
545
546
546
with chdir (project .path ):
547
547
result = cli_runner .invoke (cli .run , ['--use-tracked-files' ])
548
- assert re .search ('Linting.+?\[FAILURE]' , result .output )
548
+ assert re .search (r 'Linting.+?\[FAILURE]' , result .output )
549
549
assert result .exception
550
550
assert result .exit_code == 2
551
551
@@ -558,7 +558,7 @@ def test_use_tracked_files_include_untracked(self, cli_runner, project):
558
558
559
559
with chdir (project .path ):
560
560
result = cli_runner .invoke (cli .run , ['--use-tracked-files' , '--include-untracked' ])
561
- assert re .search ('Linting.+?\[FAILURE]' , result .output )
561
+ assert re .search (r 'Linting.+?\[FAILURE]' , result .output )
562
562
assert result .exception
563
563
assert result .exit_code == 2
564
564
@@ -605,7 +605,7 @@ def test_junit_xml(self, cli_runner, project):
605
605
606
606
with chdir (project .path ):
607
607
result = cli_runner .invoke (cli .run , ['--junit-xml=junit.xml' ])
608
- assert re .search ('Linting.+?\[FAILURE]' , result .output )
608
+ assert re .search (r 'Linting.+?\[FAILURE]' , result .output )
609
609
assert result .exception
610
610
assert result .exit_code == 2
611
611
assert project .exists ('junit.xml' )
@@ -620,7 +620,7 @@ def test_errors(self, cli_runner, project):
620
620
621
621
with chdir (project .path ):
622
622
result = cli_runner .invoke (cli .run )
623
- assert re .search ('Linting.+?\[ERROR!!]' , result .output )
623
+ assert re .search (r 'Linting.+?\[ERROR!!]' , result .output )
624
624
assert result .exception
625
625
assert result .exit_code == 1
626
626
@@ -640,7 +640,7 @@ def test_use_shortcut(self, cli_runner, project):
640
640
with chdir (project .path ):
641
641
result = cli_runner .invoke (cli .use , ['lint' ])
642
642
assert '$ therapist run --action lint --include-untracked' in result .output
643
- assert re .search ('Linting.+?\[SUCCESS]' , result .output )
643
+ assert re .search (r 'Linting.+?\[SUCCESS]' , result .output )
644
644
assert not result .exception
645
645
assert result .exit_code == 0
646
646
@@ -652,8 +652,8 @@ def test_use_extended_shortcut(self, cli_runner, project):
652
652
with chdir (project .path ):
653
653
result = cli_runner .invoke (cli .use , ['fix' ])
654
654
assert '$ therapist run --action lint --fix --include-untracked' in result .output
655
- assert re .search ('Linting.+?\[SUCCESS]' , result .output )
656
- assert re .search ('Modified files:.+?pass.py.+?<- Linting' , result .output , flags = re .DOTALL )
655
+ assert re .search (r 'Linting.+?\[SUCCESS]' , result .output )
656
+ assert re .search (r 'Modified files:.+?pass.py.+?<- Linting' , result .output , flags = re .DOTALL )
657
657
assert not result .exception
658
658
assert result .exit_code == 0
659
659
assert project .read ('pass.py' ) == 'FIXED'
@@ -667,8 +667,8 @@ def test_extend_extended_shortcut(self, cli_runner, project):
667
667
with chdir (project .path ):
668
668
result = cli_runner .invoke (cli .use , ['fix:all' ])
669
669
assert '$ therapist run --action lint --fix --include-untracked --use-tracked-files' in result .output
670
- assert re .search ('Linting.+?\[SUCCESS]' , result .output )
671
- assert re .search ('Modified files:.+?pass.py.+?<- Linting' , result .output , flags = re .DOTALL )
670
+ assert re .search (r 'Linting.+?\[SUCCESS]' , result .output )
671
+ assert re .search (r 'Modified files:.+?pass.py.+?<- Linting' , result .output , flags = re .DOTALL )
672
672
assert not result .exception
673
673
assert result .exit_code == 0
674
674
assert project .read ('pass.py' ) == 'FIXED'
@@ -783,7 +783,7 @@ def test_hook_with_fix(self, cli_runner, project):
783
783
project .git .add ('.' )
784
784
785
785
out , err , code = project .git .commit (m = 'Add a file.' )
786
- assert re .search ('Modified files:.+?pass.py.+?<- Linting' , err , flags = re .DOTALL )
786
+ assert re .search (r 'Modified files:.+?pass.py.+?<- Linting' , err , flags = re .DOTALL )
787
787
assert '[SUCCESS]' in err
788
788
789
789
out , err , code = project .git .status (porcelain = True )
@@ -804,7 +804,7 @@ def test_hook_with_fix_without_stage_modified_files(self, cli_runner, project):
804
804
project .git .add ('.' )
805
805
806
806
out , err , code = project .git .commit (m = 'Add a file.' )
807
- assert re .search ('Modified files:.+?pass.py.+?<- Linting' , err , flags = re .DOTALL )
807
+ assert re .search (r 'Modified files:.+?pass.py.+?<- Linting' , err , flags = re .DOTALL )
808
808
assert '[SUCCESS]' in err
809
809
810
810
out , err , code = project .git .status (porcelain = True )
0 commit comments