diff options
Diffstat (limited to 'git')
-rw-r--r-- | git/test/performance/lib.py | 4 | ||||
-rw-r--r-- | git/test/test_git.py | 17 | ||||
-rw-r--r-- | git/test/test_repo.py | 12 |
3 files changed, 20 insertions, 13 deletions
diff --git a/git/test/performance/lib.py b/git/test/performance/lib.py index 89105334..d8313dac 100644 --- a/git/test/performance/lib.py +++ b/git/test/performance/lib.py @@ -52,7 +52,7 @@ class TestBigRepoR(TestBase): @classmethod def setUp(cls): - super(TestBigRepoR, cls).setUpAll() + super(TestBigRepoR, cls).setUp() repo_path = resolve_or_fail(k_env_git_repo) cls.gitrorepo = Repo(repo_path, odbt=GitCmdObjectDB) cls.puregitrorepo = Repo(repo_path, odbt=GitDB) @@ -65,7 +65,7 @@ class TestBigRepoRW(TestBigRepoR): @classmethod def setUp(cls): - super(TestBigRepoRW, cls).setUpAll() + super(TestBigRepoRW, cls).setUp() dirname = tempfile.mktemp() os.mkdir(dirname) cls.gitrwrepo = cls.gitrorepo.clone(dirname, shared=True, bare=True, odbt=GitCmdObjectDB) diff --git a/git/test/test_git.py b/git/test/test_git.py index 5b0cbfee..b61a0eea 100644 --- a/git/test/test_git.py +++ b/git/test/test_git.py @@ -5,25 +5,24 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php import os, sys -from git.test.lib import ( - TestBase, - patch_object, +from git.test.lib import ( TestBase, + patch, raises, assert_equal, assert_true, assert_match, - fixture_path - ) -from git import Git, GitCommandError + fixture_path ) +from git import ( Git, + GitCommandError ) class TestGit(TestBase): @classmethod def setUp(cls): - super(TestGit, cls).setUpAll() + super(TestGit, cls).setUp() cls.git = Git(cls.rorepo.working_dir) - @patch_object(Git, 'execute') + @patch.object(Git, 'execute') def test_call_process_calls_execute(self, git): git.return_value = '' self.git.version() @@ -54,7 +53,7 @@ class TestGit(TestBase): self.git.hash_object(istream=fh, stdin=True)) fh.close() - @patch_object(Git, 'execute') + @patch.object(Git, 'execute') def test_it_ignores_false_kwargs(self, git): # this_should_not_be_ignored=False implies it *should* be ignored output = self.git.version(pass_this_kwarg=False) diff --git a/git/test/test_repo.py b/git/test/test_repo.py index 6b6fdb4a..9770d97c 100644 --- a/git/test/test_repo.py +++ b/git/test/test_repo.py @@ -3,7 +3,15 @@ # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from git.test.lib import * +from git.test.lib import (patch, + TestBase, + with_rw_repo, + fixture, + GIT_REPO, + assert_false, + assert_equal, + assert_true, + raises) from git import * from git.util import join_path_native from git.exc import BadObject @@ -242,7 +250,7 @@ class TestRepo(TestBase): self.rorepo.archive(tmpfile, '0.1.5') assert tmpfile.tell() - @patch_object(Git, '_call_process') + @patch.object(Git, '_call_process') def test_should_display_blame_information(self, git): git.return_value = fixture('blame') b = self.rorepo.blame( 'master', 'lib/git.py') |