Skip to content

Commit a3c3efd

Browse files
thetwojByron
authored andcommitted
Expanded new test for copied file
1 parent 71b3845 commit a3c3efd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

git/test/test_diff.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ def test_diff_with_copied_file(self):
121121

122122
diff = diffs[0]
123123
assert_true(diff.copied_file)
124+
assert_true(diff.a_path, u'test1.txt')
125+
assert_true(diff.b_path, u'test2.txt')
124126
assert isinstance(str(diff), str)
125127

126128
output = StringProcessAdapter(fixture('diff_copied_mode_raw'))
@@ -129,9 +131,10 @@ def test_diff_with_copied_file(self):
129131
diff = diffs[0]
130132
self.assertEqual(diff.change_type, 'C')
131133
self.assertEqual(diff.score, 100)
134+
self.assertEqual(diff.a_path, u'test1.txt')
135+
self.assertEqual(diff.b_path, u'test2.txt')
132136
self.assertEqual(len(list(diffs.iter_change_type('C'))), 1)
133137

134-
135138
def test_diff_with_change_in_type(self):
136139
output = StringProcessAdapter(fixture('diff_change_in_type'))
137140
diffs = Diff._index_from_patch_format(self.rorepo, output)

0 commit comments

Comments
 (0)