diff options
author | sroet <sanderroet@hotmail.com> | 2021-09-13 18:04:27 +0200 |
---|---|---|
committer | Sebastian Thiel <sebastian.thiel@icloud.com> | 2021-09-18 09:26:28 +0800 |
commit | cd2d53844ae50998fa81f9ce42e7bc66b60f8366 (patch) | |
tree | 8dc710a34d68674ca0c52654ff5ad8133e4b20e8 | |
parent | 0a58afea0d7c3ff57916ddd694d052123e29087f (diff) | |
download | gitpython-cd2d53844ae50998fa81f9ce42e7bc66b60f8366.tar.gz |
go for pytest.raises and test that the functions run
-rw-r--r-- | test/test_remote.py | 6 |
1 files 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) |