Don't use LocalPath.strpath

This commit is contained in:
Max Rozentsveyg 2020-05-20 12:07:45 -04:00
parent e37b2795ff
commit f35bfed79e
23 changed files with 69 additions and 69 deletions

View file

@ -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