diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-09 16:54:33 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-09 17:16:35 +0100 |
commit | 85a5a8c6a931f8b3a220ed61750d1f9758d0810a (patch) | |
tree | f17894d78fa475e53cbc2f1bdfa1b8aa21e2893f /git/test/test_diff.py | |
parent | 18caa610d50b92331485013584f5373804dd0416 (diff) | |
download | gitpython-85a5a8c6a931f8b3a220ed61750d1f9758d0810a.tar.gz |
Fixed mode-handling in Diff creation, and added assertions to catch this in future
There is still some work todo in terms of how we handle the encoding
Diffstat (limited to 'git/test/test_diff.py')
-rw-r--r-- | git/test/test_diff.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/git/test/test_diff.py b/git/test/test_diff.py index c59117ef..498f0586 100644 --- a/git/test/test_diff.py +++ b/git/test/test_diff.py @@ -73,7 +73,7 @@ class TestDiff(TestBase): 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 isinstance(str(res[0]), str), "This call should just work" + assert str(res[0]), "This call should just work" # end for each method to test def test_diff_index(self): @@ -82,6 +82,7 @@ class TestDiff(TestBase): assert len(res) == 6 for dr in res: assert dr.diff + assert str(dr), "Diff to string conversion should be possible" # end for each diff dr = res[3] @@ -129,6 +130,9 @@ class TestDiff(TestBase): assert len(diff_set) == 1 assert diff_index[0] == diff_index[0] assert not (diff_index[0] != diff_index[0]) + + for dr in diff_index: + assert str(dr), "Diff to string conversion should be possible" # END diff index checking # END for each patch option # END for each path option |