fixed assert for diff.find_similiar test
This commit is contained in:
parent
da4abb78cb
commit
86b063fbd0
@ -219,9 +219,10 @@ class DiffTest(utils.BareRepoTestCase):
|
|||||||
#~ Must pass GIT_DIFF_INCLUDE_UNMODIFIED if you expect to emulate
|
#~ Must pass GIT_DIFF_INCLUDE_UNMODIFIED if you expect to emulate
|
||||||
#~ --find-copies-harder during rename transformion...
|
#~ --find-copies-harder during rename transformion...
|
||||||
diff = commit_a.tree.diff(commit_b.tree, GIT_DIFF_INCLUDE_UNMODIFIED)
|
diff = commit_a.tree.diff(commit_b.tree, GIT_DIFF_INCLUDE_UNMODIFIED)
|
||||||
self.assertFalse(('lorem', 'ipsum', 4, 100) in diff[0].files)
|
entry = ('lorem', 'ipsum', pygit2.GIT_DELTA_RENAMED, 100)
|
||||||
|
self.assertAll(lambda x: entry not in x.files, diff)
|
||||||
diff.find_similar()
|
diff.find_similar()
|
||||||
self.assertAny(lambda x: ('lorem', 'ipsum', 4, 100) in x.files, diff)
|
self.assertAny(lambda x: entry in x.files, diff)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
Loading…
Reference in New Issue
Block a user