aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Jon Bernard <jbernard@jbernard.io> 2018-09-21 13:50:14 -0400
committerGravatar Jon Bernard <jbernard@jbernard.io> 2018-09-21 13:50:14 -0400
commit92256405ab49b3d50bd001231ea3380f8dafe343 (patch)
tree6ee702e92307355e308452564642ea8ef3b7e544
parent3bac0654d81a51157efd1dc30dfbeb5c71cc22cd (diff)
downloaddotfiles-92256405ab49b3d50bd001231ea3380f8dafe343.tar.gz
dotfiles-92256405ab49b3d50bd001231ea3380f8dafe343.tar.bz2
dotfiles-92256405ab49b3d50bd001231ea3380f8dafe343.zip
Use py's local write() in tests, fixes non-py3 test failures
-rw-r--r--tests/test_dotfile.py6
1 files 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'