Skip to content

Commit 0300d0d

Browse files
committed
Fixed unittests
1 parent 9fbc59d commit 0300d0d

File tree

6 files changed

+12
-7
lines changed

6 files changed

+12
-7
lines changed

doc/source/tutorial.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Both have two sets of methods, one of which allows interacting with single objec
3737
Acquiring information about an object from a database is easy if you have a SHA1 to refer to the object::
3838
3939
40-
ldb = LooseObjectDB(fixture_path("../../.git/objects"))
40+
ldb = LooseObjectDB(fixture_path("../../../.git/objects"))
4141
4242
for sha1 in ldb.sha_iter():
4343
oinfo = ldb.info(sha1)

gitdb/__init__.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
#{ Initialization
77
def _init_externals():
88
"""Initialize external projects by putting them into the path"""
9-
sys.path.append(os.path.join(os.path.dirname(__file__), 'ext'))
9+
sys.path.append(os.path.join(os.path.dirname(__file__), 'ext', 'async'))
10+
11+
try:
12+
import async
13+
except ImportError:
14+
raise ImportError("'async' could not be imported, assure it is located in your PYTHONPATH")
15+
#END verify import
1016

1117
#} END initialization
1218

gitdb/test/db/test_git.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class TestGitDB(TestDBBase):
88

99
def test_reading(self):
10-
gdb = GitDB(fixture_path('../../.git/objects'))
10+
gdb = GitDB(fixture_path('../../../.git/objects'))
1111

1212
# we have packs and loose objects, alternates doesn't necessarily exist
1313
assert 1 < len(gdb.databases()) < 4

gitdb/test/db/test_pack.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ def test_writing(self, path):
1515
pdb = PackedDB(path)
1616

1717
# on demand, we init our pack cache
18-
num_packs = 2
19-
assert len(pdb.entities()) == num_packs
18+
num_packs = len(pdb.entities())
2019
assert pdb._st_mtime != 0
2120

2221
# test pack directory changed:

gitdb/test/db/test_ref.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_writing(self, path):
3434

3535
# setup alternate file
3636
# add two, one is invalid
37-
own_repo_path = fixture_path('../../.git/objects') # use own repo
37+
own_repo_path = fixture_path('../../../.git/objects') # use own repo
3838
self.make_alt_file(alt_path, [own_repo_path, "invalid/path"])
3939
rdb.update_cache()
4040
assert len(rdb.databases()) == 1

gitdb/test/test_example.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class TestExamples(TestBase):
1212

1313
def test_base(self):
14-
ldb = LooseObjectDB(fixture_path("../../.git/objects"))
14+
ldb = LooseObjectDB(fixture_path("../../../.git/objects"))
1515

1616
for sha1 in ldb.sha_iter():
1717
oinfo = ldb.info(sha1)

0 commit comments

Comments
 (0)