diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-11-05 23:15:01 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-11-05 23:22:11 +0100 |
commit | e0f2bb42b56f770c50a6ef087e9049fa6ac11fb5 (patch) | |
tree | f8cf67c8cd7f7340c3f2f6f9959d69a1fe1a8773 /test/git/test_index.py | |
parent | 819d6aceeb4d31c153de58081b21ad4f8b559c0e (diff) | |
download | gitpython-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_index.py')
-rw-r--r-- | test/git/test_index.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/git/test_index.py b/test/git/test_index.py index e9541232..6f57538f 100644 --- a/test/git/test_index.py +++ b/test/git/test_index.py @@ -42,7 +42,7 @@ class TestTree(TestBase): # write the data - it must match the original tmpfile = tempfile.mktemp() index_merge.write(tmpfile) - fp = open(tmpfile, 'r') + fp = open(tmpfile, 'rb') assert fp.read() == fixture("index_merge") fp.close() os.remove(tmpfile) @@ -164,14 +164,14 @@ class TestTree(TestBase): # reset the working copy as well to current head,to pull 'back' as well new_data = "will be reverted" file_path = os.path.join(rw_repo.git.git_dir, "CHANGES") - fp = open(file_path, "w") + fp = open(file_path, "wb") fp.write(new_data) fp.close() index.reset(rev_head_parent, working_tree=True) assert not index.diff(None) assert cur_branch == rw_repo.active_branch assert cur_commit == rw_repo.head.commit - fp = open(file_path) + fp = open(file_path,'rb') try: assert fp.read() != new_data finally: |