From eca69510d250f4e69c43a230610b0ed2bd23a2e7 Mon Sep 17 00:00:00 2001 From: Harmon Date: Sun, 16 Feb 2020 16:51:49 -0600 Subject: Replace raises with assertRaises --- git/test/test_repo.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'git/test/test_repo.py') 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): -- cgit v1.2.1