Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
go for pytest.raises and test that the functions run
  • Loading branch information
sroet committed Sep 13, 2021
commit d41d5378353d5045064a1143a349b728c6f2dd80
6 changes: 3 additions & 3 deletions test/test_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ def test_timeout_funcs(self, repo):
for function in ["pull", "fetch"]: #"can't get push to reliably timeout
f = getattr(repo.remotes.origin, function)
assert f is not None # Make sure these functions exist

with self.assertRaisesRegex(GitCommandError,
"kill_after_timeout=0.01 s"):
_ = f() # Make sure the function runs
with pytest.raises(GitCommandError,
match="kill_after_timeout=0.01 s"):
f(kill_after_timeout=0.01)