Skip to content

Commit dbe78c0

Browse files
committed
Minor modifications to get tests back to work.
Two tests are failing in the latest git version, would have to dig into it
1 parent e4654ca commit dbe78c0

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

git/test/performance/lib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class TestBigRepoR(TestBase):
5252

5353
@classmethod
5454
def setUp(cls):
55-
super(TestBigRepoR, cls).setUpAll()
55+
super(TestBigRepoR, cls).setUp()
5656
repo_path = resolve_or_fail(k_env_git_repo)
5757
cls.gitrorepo = Repo(repo_path, odbt=GitCmdObjectDB)
5858
cls.puregitrorepo = Repo(repo_path, odbt=GitDB)
@@ -65,7 +65,7 @@ class TestBigRepoRW(TestBigRepoR):
6565

6666
@classmethod
6767
def setUp(cls):
68-
super(TestBigRepoRW, cls).setUpAll()
68+
super(TestBigRepoRW, cls).setUp()
6969
dirname = tempfile.mktemp()
7070
os.mkdir(dirname)
7171
cls.gitrwrepo = cls.gitrorepo.clone(dirname, shared=True, bare=True, odbt=GitCmdObjectDB)

git/test/test_git.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,24 @@
55
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
66

77
import os, sys
8-
from git.test.lib import (
9-
TestBase,
10-
patch_object,
8+
from git.test.lib import ( TestBase,
9+
patch,
1110
raises,
1211
assert_equal,
1312
assert_true,
1413
assert_match,
15-
fixture_path
16-
)
17-
from git import Git, GitCommandError
14+
fixture_path )
15+
from git import ( Git,
16+
GitCommandError )
1817

1918
class TestGit(TestBase):
2019

2120
@classmethod
2221
def setUp(cls):
23-
super(TestGit, cls).setUpAll()
22+
super(TestGit, cls).setUp()
2423
cls.git = Git(cls.rorepo.working_dir)
2524

26-
@patch_object(Git, 'execute')
25+
@patch.object(Git, 'execute')
2726
def test_call_process_calls_execute(self, git):
2827
git.return_value = ''
2928
self.git.version()
@@ -54,7 +53,7 @@ def test_it_accepts_stdin(self):
5453
self.git.hash_object(istream=fh, stdin=True))
5554
fh.close()
5655

57-
@patch_object(Git, 'execute')
56+
@patch.object(Git, 'execute')
5857
def test_it_ignores_false_kwargs(self, git):
5958
# this_should_not_be_ignored=False implies it *should* be ignored
6059
output = self.git.version(pass_this_kwarg=False)

git/test/test_repo.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@
33
#
44
# This module is part of GitPython and is released under
55
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
6-
from git.test.lib import *
6+
from git.test.lib import (patch,
7+
TestBase,
8+
with_rw_repo,
9+
fixture,
10+
GIT_REPO,
11+
assert_false,
12+
assert_equal,
13+
assert_true,
14+
raises)
715
from git import *
816
from git.util import join_path_native
917
from git.exc import BadObject
@@ -242,7 +250,7 @@ def test_archive(self):
242250
self.rorepo.archive(tmpfile, '0.1.5')
243251
assert tmpfile.tell()
244252

245-
@patch_object(Git, '_call_process')
253+
@patch.object(Git, '_call_process')
246254
def test_should_display_blame_information(self, git):
247255
git.return_value = fixture('blame')
248256
b = self.rorepo.blame( 'master', 'lib/git.py')

0 commit comments

Comments
 (0)