Skip to content

Commit 699e223

Browse files
SjordByron
authored andcommitted
Test raise_if_error
1 parent 9240de9 commit 699e223

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: test/test_remote.py

+6
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,12 @@ def _do_test_push_result(self, results, remote):
154154
# END error checking
155155
# END for each info
156156

157+
if any([info.flags & info.ERROR for info in results]):
158+
self.assertRaises(GitCommandError, results.raise_if_error)
159+
else:
160+
# No errors, so this should do nothing
161+
results.raise_if_error()
162+
157163
def _do_test_fetch_info(self, repo):
158164
self.assertRaises(ValueError, FetchInfo._from_line, repo, "nonsense", '')
159165
self.assertRaises(

0 commit comments

Comments
 (0)