diff options
author | Harmon <Harmon758@gmail.com> | 2020-02-16 16:51:49 -0600 |
---|---|---|
committer | Harmon <Harmon758@gmail.com> | 2020-02-16 16:51:49 -0600 |
commit | eca69510d250f4e69c43a230610b0ed2bd23a2e7 (patch) | |
tree | 687f333cbf5e25c61933d9bc0589ad4c5ea41a7f /git/test/test_repo.py | |
parent | c8c63abb360b4829b3d75d60fb837c0132db0510 (diff) | |
download | gitpython-eca69510d250f4e69c43a230610b0ed2bd23a2e7.tar.gz |
Replace raises with assertRaises
Diffstat (limited to 'git/test/test_repo.py')
-rw-r--r-- | git/test/test_repo.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/git/test/test_repo.py b/git/test/test_repo.py index c37fd744..a3fff4a8 100644 --- a/git/test/test_repo.py +++ b/git/test/test_repo.py @@ -42,8 +42,7 @@ from git.test.lib import ( with_rw_repo, fixture, assert_false, - assert_true, - raises + assert_true ) from git.util import HIDE_WINDOWS_KNOWN_ERRORS, cygpath from git.test.lib import with_rw_directory @@ -82,13 +81,11 @@ class TestRepo(TestBase): import gc gc.collect() - @raises(InvalidGitRepositoryError) def test_new_should_raise_on_invalid_repo_location(self): - Repo(tempfile.gettempdir()) + self.assertRaises(InvalidGitRepositoryError, Repo, tempfile.gettempdir()) - @raises(NoSuchPathError) def test_new_should_raise_on_non_existent_path(self): - Repo("repos/foobar") + self.assertRaises(NoSuchPathError, Repo, "repos/foobar") @with_rw_repo('0.3.2.1') def test_repo_creation_from_different_paths(self, rw_repo): |