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

Commit1875885

Browse files
committed
Fix test cases
1 parentc042f56 commit1875885

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎git/test/test_diff.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
Repo,
2222
GitCommandError,
2323
Diff,
24-
DiffIndex
24+
DiffIndex,
25+
NULL_TREE,
2526
)
2627

2728

@@ -132,13 +133,13 @@ def test_diff_initial_commit(self):
132133
initial_commit=self.rorepo.commit('33ebe7acec14b25c5f84f35a664803fcab2f7781')
133134

134135
# Without creating a patch...
135-
diff_index=initial_commit.diff('root')
136+
diff_index=initial_commit.diff(NULL_TREE)
136137
assertdiff_index[0].b_path=='CHANGES'
137138
assertdiff_index[0].new_file
138139
assertdiff_index[0].diff==''
139140

140141
# ...and with creating a patch
141-
diff_index=initial_commit.diff('root',create_patch=True)
142+
diff_index=initial_commit.diff(NULL_TREE,create_patch=True)
142143
assertdiff_index[0].b_path=='CHANGES'
143144
assertdiff_index[0].new_file
144145
assertdiff_index[0].diff==fixture('diff_initial')
@@ -164,7 +165,7 @@ def test_diff_interface(self):
164165
diff_item=commit.tree
165166
# END use tree every second item
166167

167-
forotherin (None,'root',commit.Index,commit.parents[0]):
168+
forotherin (None,NULL_TREE,commit.Index,commit.parents[0]):
168169
forpathsin (None,"CHANGES", ("CHANGES","lib")):
169170
forcreate_patchinrange(2):
170171
diff_index=diff_item.diff(other=other,paths=paths,create_patch=create_patch)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp