diff options
author | Michael Trier <mtrier@gmail.com> | 2008-12-15 20:47:19 -0500 |
---|---|---|
committer | Michael Trier <mtrier@gmail.com> | 2008-12-15 20:47:19 -0500 |
commit | 6ba8b8b91907bd087dfe201eb0d5dae2feb54881 (patch) | |
tree | 0f553a341cdde34d8a92030965b8219a36945308 /test/git/test_diff.py | |
parent | 5e062f4d043234312446ea9445f07bd9dc309ce3 (diff) | |
download | gitpython-6ba8b8b91907bd087dfe201eb0d5dae2feb54881.tar.gz |
Added in new properties Diff.renamed, Diff.rename_from, and Diff.rename_to
Diffstat (limited to 'test/git/test_diff.py')
-rw-r--r-- | test/git/test_diff.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/git/test_diff.py b/test/git/test_diff.py index 9b7e9c73..94ac03e0 100644 --- a/test/git/test_diff.py +++ b/test/git/test_diff.py @@ -10,9 +10,21 @@ from git import * class TestDiff(object): def setup(self): self.repo = Repo(GIT_REPO) - + def test_list_from_string_new_mode(self): output = fixture('diff_new_mode') diffs = Diff.list_from_string(self.repo, output) assert_equal(1, len(diffs)) assert_equal(10, len(diffs[0].diff.splitlines())) + + def test_diff_with_rename(self): + output = fixture('diff_rename') + diffs = Diff.list_from_string(self.repo, output) + + assert_equal(1, len(diffs)) + + diff = diffs[0] + assert_true(diff.renamed) + assert_equal(diff.rename_from, 'AUTHORS') + assert_equal(diff.rename_to, 'CONTRIBUTORS') + |