File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 11
11
12
12
from gitdb import (
13
13
MemoryDB ,
14
+ GitDB ,
14
15
IStream ,
15
16
)
16
17
from gitdb .typ import str_blob_type
@@ -83,7 +84,8 @@ def test_loose_correctness(self):
83
84
faster
84
85
:note: It doesn't seem this test can find the issue unless the given pack contains highly compressed
85
86
data files, like archives."""
86
- pdb = PackedDB (os .path .join (self .gitrepopath , "objects/pack" ))
87
+ from gitdb .util import bin_to_hex
88
+ pdb = GitDB (os .path .join (self .gitrepopath , 'objects' ))
87
89
mdb = MemoryDB ()
88
90
for c , sha in enumerate (pdb .sha_iter ()):
89
91
ostream = pdb .stream (sha )
@@ -92,7 +94,7 @@ def test_loose_correctness(self):
92
94
continue
93
95
istream = IStream (ostream .type , ostream .size , ostream .stream )
94
96
mdb .store (istream )
95
- assert istream .binsha == sha
97
+ assert istream .binsha == sha , "Failed on object %s" % bin_to_hex ( sha ). decode ( 'ascii' )
96
98
# this can fail ... sometimes, so the packs dataset should be huge
97
99
assert len (mdb .stream (sha ).read ()) == ostream .size
98
100
You can’t perform that action at this time.
0 commit comments