summaryrefslogtreecommitdiff
path: root/test/git/test_utils.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-11-05 23:15:01 +0100
committerSebastian Thiel <byronimo@gmail.com>2009-11-05 23:22:11 +0100
commite0f2bb42b56f770c50a6ef087e9049fa6ac11fb5 (patch)
treef8cf67c8cd7f7340c3f2f6f9959d69a1fe1a8773 /test/git/test_utils.py
parent819d6aceeb4d31c153de58081b21ad4f8b559c0e (diff)
downloadgitpython-e0f2bb42b56f770c50a6ef087e9049fa6ac11fb5.tar.gz
ARGH: wb and rb is not the same as r and w on windows, hence reading of binary files went crazy as well as binary writing
Diffstat (limited to 'test/git/test_utils.py')
-rw-r--r--test/git/test_utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/git/test_utils.py b/test/git/test_utils.py
index 029d2054..69a9297d 100644
--- a/test/git/test_utils.py
+++ b/test/git/test_utils.py
@@ -56,7 +56,7 @@ class TestUtils(TestCase):
def _cmp_contents(self, file_path, data):
# raise if data from file at file_path
# does not match data string
- fp = open(file_path, "r")
+ fp = open(file_path, "rb")
try:
assert fp.read() == data
finally:
@@ -66,7 +66,7 @@ class TestUtils(TestCase):
my_file = tempfile.mktemp()
orig_data = "hello"
new_data = "world"
- my_file_fp = open(my_file, "w")
+ my_file_fp = open(my_file, "wb")
my_file_fp.write(orig_data)
my_file_fp.close()