mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-18 08:34:41 +04:00
Replace five with six
This commit is contained in:
parent
cb8dd335f4
commit
c65a11ce3d
9 changed files with 27 additions and 57 deletions
|
|
@ -6,7 +6,6 @@ import subprocess
|
|||
import mock
|
||||
import pytest
|
||||
|
||||
from pre_commit import five
|
||||
from pre_commit.prefixed_command_runner import PrefixedCommandRunner
|
||||
from pre_commit.util import CalledProcessError
|
||||
|
||||
|
|
@ -17,10 +16,7 @@ def norm_slash(input_tup):
|
|||
|
||||
def test_CalledProcessError_str():
|
||||
error = CalledProcessError(
|
||||
1,
|
||||
[five.n('git'), five.n('status')],
|
||||
0,
|
||||
(five.n('stdout'), five.n('stderr')),
|
||||
1, [str('git'), str('status')], 0, (str('stdout'), str('stderr')),
|
||||
)
|
||||
assert str(error) == (
|
||||
"Command: ['git', 'status']\n"
|
||||
|
|
@ -35,7 +31,7 @@ def test_CalledProcessError_str():
|
|||
|
||||
def test_CalledProcessError_str_nooutput():
|
||||
error = CalledProcessError(
|
||||
1, [five.n('git'), five.n('status')], 0, (five.n(''), five.n(''))
|
||||
1, [str('git'), str('status')], 0, (str(''), str(''))
|
||||
)
|
||||
assert str(error) == (
|
||||
"Command: ['git', 'status']\n"
|
||||
|
|
@ -78,7 +74,7 @@ def test_run_substitutes_prefix(popen_mock, makedirs_mock):
|
|||
)
|
||||
ret = instance.run(['{prefix}bar', 'baz'], retcode=None)
|
||||
popen_mock.assert_called_once_with(
|
||||
(five.n(os.path.join('prefix', 'bar')), five.n('baz')),
|
||||
(str(os.path.join('prefix', 'bar')), str('baz')),
|
||||
env=None,
|
||||
stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue