summaryrefslogtreecommitdiff
path: root/git/test/test_diff.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2015-01-09 17:14:32 +0100
committerSebastian Thiel <byronimo@gmail.com>2015-01-09 17:16:35 +0100
commitc767b5206f1e9c8536110dda4d515ebb9242bbeb (patch)
tree50b1aca035d522ea7d6a8f003f7fbf18d1e4fe4b /git/test/test_diff.py
parent85a5a8c6a931f8b3a220ed61750d1f9758d0810a (diff)
downloadgitpython-c767b5206f1e9c8536110dda4d515ebb9242bbeb.tar.gz
Now Diff.__str__ works correctly in all python versions.
Additionally, unicode handling was improved to the point where we deal with all diff(create_path=True) data as binary. Therefore we don't claim to know all encodings of all textfiles in the world, even though we still assume that everything git throws at us is utf-8 encoded. Fixes #113
Diffstat (limited to 'git/test/test_diff.py')
-rw-r--r--git/test/test_diff.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/git/test/test_diff.py b/git/test/test_diff.py
index 498f0586..42972603 100644
--- a/git/test/test_diff.py
+++ b/git/test/test_diff.py
@@ -72,7 +72,7 @@ class TestDiff(TestBase):
assert len(res) == 1
assert len(list(res.iter_change_type('M'))) == 1
if res[0].diff:
- assert res[0].diff == "Binary files a/rps and b/rps differ\n", "in patch mode, we get a diff text"
+ assert res[0].diff == b"Binary files a/rps and b/rps differ\n", "in patch mode, we get a diff text"
assert str(res[0]), "This call should just work"
# end for each method to test
@@ -86,7 +86,7 @@ class TestDiff(TestBase):
# end for each diff
dr = res[3]
- assert dr.diff.endswith("+Binary files a/rps and b/rps differ\n")
+ assert dr.diff.endswith(b"+Binary files a/rps and b/rps differ\n")
def test_diff_patch_format(self):
# test all of the 'old' format diffs for completness - it should at least