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

Appearance settings

Commit cd2d538

Browse filesBrowse files
sroetByron
authored andcommitted
go for pytest.raises and test that the functions run
1 parent 0a58afe commit cd2d538
Copy full SHA for cd2d538

1 file changed

+3-3Lines changed: 3 additions & 3 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/test_remote.py‎

Copy file name to clipboardExpand all lines: test/test_remote.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ def test_timeout_funcs(self, repo):
661661
for function in ["pull", "fetch"]: #"can't get push to reliably timeout
662662
f = getattr(repo.remotes.origin, function)
663663
assert f is not None # Make sure these functions exist
664-
665-
with self.assertRaisesRegex(GitCommandError,
666-
"kill_after_timeout=0.01 s"):
664+
_ = f() # Make sure the function runs
665+
with pytest.raises(GitCommandError,
666+
match="kill_after_timeout=0.01 s"):
667667
f(kill_after_timeout=0.01)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.