mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-04 19:26:52 +00:00
Don't use LocalPath.strpath
This commit is contained in:
parent
e37b2795ff
commit
f35bfed79e
23 changed files with 69 additions and 69 deletions
|
|
@ -42,7 +42,7 @@ TESTS = (
|
|||
def test_rewrite(input_s, output, expected_retval, tmpdir):
|
||||
path = tmpdir.join('file.py')
|
||||
path.write(input_s)
|
||||
retval = main([path.strpath])
|
||||
retval = main([str(path)])
|
||||
assert path.read() == output
|
||||
assert retval == expected_retval
|
||||
|
||||
|
|
@ -50,5 +50,5 @@ def test_rewrite(input_s, output, expected_retval, tmpdir):
|
|||
def test_rewrite_crlf(tmpdir):
|
||||
f = tmpdir.join('f.py')
|
||||
f.write_binary(b'"foo"\r\n"bar"\r\n')
|
||||
assert main((f.strpath,))
|
||||
assert main((str(f),))
|
||||
assert f.read_binary() == b"'foo'\r\n'bar'\r\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue