Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit38c624f

Browse files
thetwojByron
authored andcommitted
Adding assertions to existing test case to cover this change
1 parent14d7034 commit38c624f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎git/test/test_diff.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@ def test_diff_with_staged_file(self, rw_dir):
6868

6969
withopen(fp,'w')asfs:
7070
fs.write("Hola Mundo")
71-
r.git.commit(all=True,message="change on master")
71+
r.git.add(Git.polish_url(fp))
72+
self.assertEqual(len(r.index.diff("HEAD",create_patch=True)),1,
73+
"create_patch should generate patch of diff to HEAD")
74+
r.git.commit(message="change on master")
75+
self.assertEqual(len(r.index.diff("HEAD",create_patch=True)),0,
76+
"create_patch should generate no patch, already on HEAD")
7277

7378
r.git.checkout('HEAD~1',b='topic')
7479
withopen(fp,'w')asfs:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp