diff options
author | JJ Graham <thetwoj@gmail.com> | 2019-10-21 17:28:00 -0500 |
---|---|---|
committer | Sebastian Thiel <sebastian.thiel@icloud.com> | 2019-10-22 12:39:27 +0200 |
commit | 38c624f74061a459a94f6d1dac250271f5548dab (patch) | |
tree | c7456ccc7f89e8d8eafe4683f4c5250906561985 /git/test | |
parent | 14d7034adc2698c1e7dd13570c23d217c753e932 (diff) | |
download | gitpython-38c624f74061a459a94f6d1dac250271f5548dab.tar.gz |
Adding assertions to existing test case to cover this change
Diffstat (limited to 'git/test')
-rw-r--r-- | git/test/test_diff.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/git/test/test_diff.py b/git/test/test_diff.py index 56e51289..e4e7556d 100644 --- a/git/test/test_diff.py +++ b/git/test/test_diff.py @@ -68,7 +68,12 @@ class TestDiff(TestBase): with open(fp, 'w') as fs: fs.write("Hola Mundo") - r.git.commit(all=True, message="change on master") + r.git.add(Git.polish_url(fp)) + self.assertEqual(len(r.index.diff("HEAD", create_patch=True)), 1, + "create_patch should generate patch of diff to HEAD") + r.git.commit(message="change on master") + self.assertEqual(len(r.index.diff("HEAD", create_patch=True)), 0, + "create_patch should generate no patch, already on HEAD") r.git.checkout('HEAD~1', b='topic') with open(fp, 'w') as fs: |