From e0f2bb42b56f770c50a6ef087e9049fa6ac11fb5 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 5 Nov 2009 23:15:01 +0100 Subject: 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 --- test/git/test_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/git/test_utils.py') 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() -- cgit v1.2.1