mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-09 04:54:16 +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
|
|
@ -25,7 +25,7 @@ skip_win32 = pytest.mark.skipif(
|
|||
def test_has_shebang(content, tmpdir):
|
||||
path = tmpdir.join('path')
|
||||
path.write(content, 'wb')
|
||||
assert main((path.strpath,)) == 0
|
||||
assert main((str(path),)) == 0
|
||||
|
||||
|
||||
@skip_win32 # pragma: win32 no cover
|
||||
|
|
@ -41,7 +41,7 @@ def test_has_shebang(content, tmpdir):
|
|||
def test_bad_shebang(content, tmpdir, capsys):
|
||||
path = tmpdir.join('path')
|
||||
path.write(content, 'wb')
|
||||
assert main((path.strpath,)) == 1
|
||||
assert main((str(path),)) == 1
|
||||
_, stderr = capsys.readouterr()
|
||||
assert stderr.startswith(f'{path}: marked executable but')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue