Fix Python2.6 coverage.

This commit is contained in:
Anthony Sottile 2014-04-13 22:31:47 -07:00
parent 8270d81308
commit 8328f8f518

View file

@ -9,8 +9,7 @@ def test_fixes_trailing_whitespace(tmpdir):
('foo.py', 'foo \nbar \n'),
('bar.py', 'bar\t\nbaz\t\n'),
):
with open(filename, 'w') as file_obj:
file_obj.write(contents)
open(filename, 'w').write(contents)
ret = fix_trailing_whitespace(['foo.py', 'bar.py'])
assert ret == 1