mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-06 12:06:53 +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
|
|
@ -67,16 +67,16 @@ def test_autofix_main(tmpdir):
|
|||
srcfile = tmpdir.join('to_be_json_formatted.json')
|
||||
shutil.copyfile(
|
||||
get_resource_path('not_pretty_formatted_json.json'),
|
||||
srcfile.strpath,
|
||||
str(srcfile),
|
||||
)
|
||||
|
||||
# now launch the autofix on that file
|
||||
ret = main(['--autofix', srcfile.strpath])
|
||||
ret = main(['--autofix', str(srcfile)])
|
||||
# it should have formatted it
|
||||
assert ret == 1
|
||||
|
||||
# file was formatted (shouldn't trigger linter again)
|
||||
ret = main([srcfile.strpath])
|
||||
ret = main([str(srcfile)])
|
||||
assert ret == 0
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue