66import mock
77import pytest
88
9- from pre_commit import five
109from pre_commit .prefixed_command_runner import PrefixedCommandRunner
1110from pre_commit .util import CalledProcessError
1211
@@ -17,10 +16,7 @@ def norm_slash(input_tup):
1716
1817def test_CalledProcessError_str ():
1918 error = CalledProcessError (
20- 1 ,
21- [five .n ('git' ), five .n ('status' )],
22- 0 ,
23- (five .n ('stdout' ), five .n ('stderr' )),
19+ 1 , [str ('git' ), str ('status' )], 0 , (str ('stdout' ), str ('stderr' )),
2420 )
2521 assert str (error ) == (
2622 "Command: ['git', 'status']\n "
@@ -35,7 +31,7 @@ def test_CalledProcessError_str():
3531
3632def test_CalledProcessError_str_nooutput ():
3733 error = CalledProcessError (
38- 1 , [five . n ('git' ), five . n ('status' )], 0 , (five . n ('' ), five . n ('' ))
34+ 1 , [str ('git' ), str ('status' )], 0 , (str ('' ), str ('' ))
3935 )
4036 assert str (error ) == (
4137 "Command: ['git', 'status']\n "
@@ -78,7 +74,7 @@ def test_run_substitutes_prefix(popen_mock, makedirs_mock):
7874 )
7975 ret = instance .run (['{prefix}bar' , 'baz' ], retcode = None )
8076 popen_mock .assert_called_once_with (
81- (five . n (os .path .join ('prefix' , 'bar' )), five . n ('baz' )),
77+ (str (os .path .join ('prefix' , 'bar' )), str ('baz' )),
8278 env = None ,
8379 stdin = subprocess .PIPE ,
8480 stdout = subprocess .PIPE ,
0 commit comments