@@ -66,7 +66,7 @@ def test_install_pre_commit(tempdir_factory):
6666 sys_executable = sys .executable ,
6767 hook_type = 'pre-commit' ,
6868 pre_push = '' ,
69- skip_on_missing_conf = 'false'
69+ skip_on_missing_conf = 'false' ,
7070 )
7171 assert pre_commit_contents == expected_contents
7272 assert os .access (runner .pre_commit_path , os .X_OK )
@@ -81,7 +81,7 @@ def test_install_pre_commit(tempdir_factory):
8181 sys_executable = sys .executable ,
8282 hook_type = 'pre-push' ,
8383 pre_push = pre_push_template_contents ,
84- skip_on_missing_conf = 'false'
84+ skip_on_missing_conf = 'false' ,
8585 )
8686 assert pre_push_contents == expected_contents
8787
@@ -579,8 +579,11 @@ def test_install_allow_mising_config(tempdir_factory):
579579
580580 ret , output = _get_commit_output (tempdir_factory )
581581 assert ret == 0
582- assert '`.pre-commit-config.yaml` config file not found. ' \
583- 'Skipping `pre-commit`.' in output
582+ expected = (
583+ '`.pre-commit-config.yaml` config file not found. '
584+ 'Skipping `pre-commit`.'
585+ )
586+ assert expected in output
584587
585588
586589def test_install_temporarily_allow_mising_config (tempdir_factory ):
@@ -591,10 +594,11 @@ def test_install_temporarily_allow_mising_config(tempdir_factory):
591594 remove_config_from_repo (path )
592595 assert install (runner , overwrite = True , skip_on_missing_conf = False ) == 0
593596
594- extra_env = {'PRE_COMMIT_ALLOW_NO_CONFIG' : '1' }
595- env = os .environ .copy ()
596- env .update (extra_env )
597+ env = dict (os .environ , PRE_COMMIT_ALLOW_NO_CONFIG = '1' )
597598 ret , output = _get_commit_output (tempdir_factory , env = env )
598599 assert ret == 0
599- assert '`.pre-commit-config.yaml` config file not found. ' \
600- 'Skipping `pre-commit`.' in output
600+ expected = (
601+ '`.pre-commit-config.yaml` config file not found. '
602+ 'Skipping `pre-commit`.'
603+ )
604+ assert expected in output
0 commit comments