From 92256405ab49b3d50bd001231ea3380f8dafe343 Mon Sep 17 00:00:00 2001 From: Jon Bernard Date: Fri, 21 Sep 2018 13:50:14 -0400 Subject: Use py's local write() in tests, fixes non-py3 test failures --- tests/test_dotfile.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/test_dotfile.py b/tests/test_dotfile.py index fdb51da..a4584e3 100644 --- a/tests/test_dotfile.py +++ b/tests/test_dotfile.py @@ -38,12 +38,10 @@ def test_state(repo): dotfile.name.ensure() assert dotfile.state == 'ok' - with open(dotfile.name, 'w') as f: - f.write('test content') + dotfile.name.write('test content') assert dotfile.state == 'conflict' - with open(dotfile.target, 'w') as f: - f.write('test content') + dotfile.target.write('test content') assert dotfile.state == 'ok' -- cgit v1.2.3