Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdbe78c0

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 parente4654ca commitdbe78c0

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
defsetUp(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
defsetUp(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
importos,sys
8-
fromgit.test.libimport (
9-
TestBase,
10-
patch_object,
8+
fromgit.test.libimport (TestBase,
9+
patch,
1110
raises,
1211
assert_equal,
1312
assert_true,
1413
assert_match,
15-
fixture_path
16-
)
17-
fromgitimportGit,GitCommandError
14+
fixture_path )
15+
fromgitimport (Git,
16+
GitCommandError )
1817

1918
classTestGit(TestBase):
2019

2120
@classmethod
2221
defsetUp(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
deftest_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
deftest_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-
fromgit.test.libimport*
6+
fromgit.test.libimport (patch,
7+
TestBase,
8+
with_rw_repo,
9+
fixture,
10+
GIT_REPO,
11+
assert_false,
12+
assert_equal,
13+
assert_true,
14+
raises)
715
fromgitimport*
816
fromgit.utilimportjoin_path_native
917
fromgit.excimportBadObject
@@ -242,7 +250,7 @@ def test_archive(self):
242250
self.rorepo.archive(tmpfile,'0.1.5')
243251
asserttmpfile.tell()
244252

245-
@patch_object(Git,'_call_process')
253+
@patch.object(Git,'_call_process')
246254
deftest_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)

[8]ページ先頭

©2009-2025 Movatter.jp