diff options
author | Sebastian Thiel <sebastian.thiel@icloud.com> | 2022-09-27 22:22:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-27 22:22:14 +0800 |
commit | 0d28eaac0320d2fd25c88656b42973ea31edcbda (patch) | |
tree | 690911c6f8014a2705f4721ef2fe65a2fea5f182 /test/test_diff.py | |
parent | b27c41aac3cbc95ad15823058228b8d2461b8e7c (diff) | |
parent | 41003c548f9df2dc389f14be58b5a41d35d0e73d (diff) | |
download | gitpython-0d28eaac0320d2fd25c88656b42973ea31edcbda.tar.gz |
Merge pull request #1497 from dwapstra/git_diff_empty
Ignore empty info in diff line
Diffstat (limited to 'test/test_diff.py')
-rw-r--r-- | test/test_diff.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_diff.py b/test/test_diff.py index dcf10018..7065f063 100644 --- a/test/test_diff.py +++ b/test/test_diff.py @@ -240,6 +240,12 @@ class TestDiff(TestBase): output = fixture("diff_file_with_colon") res = [] Diff._handle_diff_line(output, None, res) + self.assertEqual(len(res), 3) + + def test_empty_diff(self): + res = [] + Diff._handle_diff_line(b"", None, res) + self.assertEqual(res, []) def test_diff_initial_commit(self): initial_commit = self.rorepo.commit("33ebe7acec14b25c5f84f35a664803fcab2f7781") |