Skip to content

Commit cd2d538

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

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/test_remote.py

+3-3
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)