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
|
|
@ -33,7 +33,7 @@ def test_finds_breakpoint():
|
|||
def test_returns_one_for_failing_file(tmpdir):
|
||||
f_py = tmpdir.join('f.py')
|
||||
f_py.write('def f():\n import pdb; pdb.set_trace()')
|
||||
ret = main([f_py.strpath])
|
||||
ret = main([str(f_py)])
|
||||
assert ret == 1
|
||||
|
||||
|
||||
|
|
@ -50,10 +50,10 @@ def test_syntaxerror_file():
|
|||
def test_non_utf8_file(tmpdir):
|
||||
f_py = tmpdir.join('f.py')
|
||||
f_py.write_binary('# -*- coding: cp1252 -*-\nx = "€"\n'.encode('cp1252'))
|
||||
assert main((f_py.strpath,)) == 0
|
||||
assert main((str(f_py),)) == 0
|
||||
|
||||
|
||||
def test_py37_breakpoint(tmpdir):
|
||||
f_py = tmpdir.join('f.py')
|
||||
f_py.write('def f():\n breakpoint()\n')
|
||||
assert main((f_py.strpath,)) == 1
|
||||
assert main((str(f_py),)) == 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue