File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1111
1212from gitdb import (
1313 MemoryDB ,
14+ GitDB ,
1415 IStream ,
1516)
1617from gitdb .typ import str_blob_type
@@ -83,7 +84,8 @@ def test_loose_correctness(self):
8384 faster
8485 :note: It doesn't seem this test can find the issue unless the given pack contains highly compressed
8586 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' ))
8789 mdb = MemoryDB ()
8890 for c , sha in enumerate (pdb .sha_iter ()):
8991 ostream = pdb .stream (sha )
@@ -92,7 +94,7 @@ def test_loose_correctness(self):
9294 continue
9395 istream = IStream (ostream .type , ostream .size , ostream .stream )
9496 mdb .store (istream )
95- assert istream .binsha == sha
97+ assert istream .binsha == sha , "Failed on object %s" % bin_to_hex ( sha ). decode ( 'ascii' )
9698 # this can fail ... sometimes, so the packs dataset should be huge
9799 assert len (mdb .stream (sha ).read ()) == ostream .size
98100
You can’t perform that action at this time.
0 commit comments