Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f77230f

Browse files
committed
Basic fixes to get tests back on track. Of course there is much more work to be done here
1 parent 661c2e4 commit f77230f

File tree

10 files changed

+23
-19
lines changed

10 files changed

+23
-19
lines changed

.gitmodules

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[submodule "async"]
22
path = git/ext/async
33
url = http://github.com/gitpython-developers/async.git
4+
branch = master
45
[submodule "smmap"]
56
path = git/ext/smmap
67
url = http://github.com/Byron/smmap.git
8+
branch = master

README.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ The object database implementation is optimized for handling large quantities of
1111
REQUIREMENTS
1212
============
1313

14-
* Git ( tested with 1.7.3.2 )
14+
* Git ( tested with 1.8.3.4 )
1515
* Python Nose - used for running the tests
16-
* Mock by Michael Foord used for tests. Requires 0.5
16+
* Tested with nose 1.3.0
17+
* Mock by Michael Foord used for tests
18+
* Tested with 1.0.1
1719

1820
INSTALL
1921
=======

git/test/db/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def test_archive(self):
256256
self.rorepo.archive(tmpfile, '0.1.5')
257257
assert tmpfile.tell()
258258

259-
@patch_object(Git, '_call_process')
259+
@patch.object(Git, '_call_process')
260260
def test_should_display_blame_information(self, git):
261261
git.return_value = fixture('blame')
262262
b = self.rorepo.blame( 'master', 'lib/git.py')

git/test/db/lib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class TestDBBase(TestBase):
6464
#} END configuration
6565

6666
@classmethod
67-
def setUpAll(cls):
67+
def setUp(cls):
6868
"""
6969
Dynamically add a read-only repository to our actual type. This way
7070
each test type has its own repository

git/test/lib/helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ class TestBase(TestCase):
292292
"""
293293

294294
@classmethod
295-
def setUpAll(cls):
295+
def setUp(cls):
296296
"""This method is only called to provide the most basic functionality
297297
Subclasses may just override it or implement it differently"""
298298
cls.rorepo = Repo(rorepo_dir())

git/test/performance/db/looseodb_impl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ class TestLooseDBWPerformanceBase(TestBigRepoR):
6060
#} END configuration
6161

6262
@classmethod
63-
def setUpAll(cls):
64-
super(TestLooseDBWPerformanceBase, cls).setUpAll()
63+
def setUp(cls):
64+
super(TestLooseDBWPerformanceBase, cls).setUp()
6565
if cls.LooseODBCls is None:
6666
raise AssertionError("LooseODBCls must be set in subtype")
6767
#END assert configuration

git/test/performance/db/packedodb_impl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ class TestPurePackedODBPerformanceBase(TestBigRepoR):
2727
#} END configuration
2828

2929
@classmethod
30-
def setUpAll(cls):
31-
super(TestPurePackedODBPerformanceBase, cls).setUpAll()
30+
def setUp(cls):
31+
super(TestPurePackedODBPerformanceBase, cls).setUp()
3232
if cls.PackedODBCls is None:
3333
raise AssertionError("PackedODBCls must be set in subclass")
3434
#END assert configuration

git/test/performance/lib.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ class TestBigRepoR(TestBase):
4747
#} END configuration
4848

4949
@classmethod
50-
def setUpAll(cls):
51-
super(TestBigRepoR, cls).setUpAll()
50+
def setUp(cls):
51+
super(TestBigRepoR, cls).setUp()
5252
if cls.RepoCls is None:
5353
raise AssertionError("Require RepoCls in class %s to be set" % cls)
5454
#END assert configuration
@@ -61,8 +61,8 @@ class TestBigRepoRW(TestBigRepoR):
6161
Provides ``self.rwrepo``"""
6262

6363
@classmethod
64-
def setUpAll(cls):
65-
super(TestBigRepoRW, cls).setUpAll()
64+
def setUp(cls):
65+
super(TestBigRepoRW, cls).setUp()
6666
dirname = tempfile.mktemp()
6767
os.mkdir(dirname)
6868
cls.rwrepo = cls.rorepo.clone(dirname, shared=True, bare=True)

git/test/test_cmd.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import os, sys
88
from git.test.lib import (
99
TestBase,
10-
patch_object,
10+
patch,
1111
raises,
1212
assert_equal,
1313
assert_true,
@@ -19,11 +19,11 @@
1919
class TestGit(TestBase):
2020

2121
@classmethod
22-
def setUpAll(cls):
23-
super(TestGit, cls).setUpAll()
22+
def setUp(cls):
23+
super(TestGit, cls).setUp()
2424
cls.git = Git(cls.rorepo.working_dir)
2525

26-
@patch_object(Git, 'execute')
26+
@patch.object(Git, 'execute')
2727
def test_call_process_calls_execute(self, git):
2828
git.return_value = ''
2929
self.git.version()
@@ -54,7 +54,7 @@ def test_it_accepts_stdin(self):
5454
self.git.hash_object(istream=fh, stdin=True))
5555
fh.close()
5656

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

0 commit comments

Comments
 (0)