From cd2d53844ae50998fa81f9ce42e7bc66b60f8366 Mon Sep 17 00:00:00 2001 From: sroet Date: Mon, 13 Sep 2021 18:04:27 +0200 Subject: go for pytest.raises and test that the functions run --- test/test_remote.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test_remote.py b/test/test_remote.py index 1cbc2eb2..10f0bb4b 100644 --- a/test/test_remote.py +++ b/test/test_remote.py @@ -661,7 +661,7 @@ class TestTimeouts(TestBase): 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) -- cgit v1.2.1