File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- """Test for object db"""
2- from lib import (
1+ """Base classes for object db testing """
2+ from gitdb . test . lib import (
33 with_rw_directory ,
44 ZippedStoreShaWriter ,
55 TestBase
66 )
77
8- from gitdb import *
9- from gitdb .stream import Sha1Writer
8+ from gitdb .stream import (
9+ Sha1Writer ,
10+ IStream ,
11+ OStream ,
12+ OInfo
13+ )
14+
1015from gitdb .exc import BadObject
1116from gitdb .typ import str_blob_type
1217
1318from async import IteratorReader
1419
1520from cStringIO import StringIO
16- import os
21+
22+
23+ __all__ = ('TestDBBase' , 'with_rw_directory' )
1724
18- class TestDB (TestBase ):
19- """Test the different db class implementations """
25+ class TestDBBase (TestBase ):
26+ """Base class providing testing routines on databases """
2027
2128 # data
2229 two_lines = "1234\n hello world"
@@ -166,13 +173,3 @@ def istream_generator(offset=0, ni=ni):
166173 assert count == nni
167174
168175
169-
170-
171- @with_rw_directory
172- def test_writing (self , path ):
173- ldb = LooseObjectDB (path )
174-
175- # write data
176- self ._assert_object_writing (ldb )
177- self ._assert_object_writing_async (ldb )
178-
Original file line number Diff line number Diff line change 1+ from lib import *
2+ from gitdb .db import LooseObjectDB
3+
4+ class TestLooseDB (TestDBBase ):
5+
6+ @with_rw_directory
7+ def test_writing (self , path ):
8+ ldb = LooseObjectDB (path )
9+
10+ # write data
11+ self ._assert_object_writing (ldb )
12+ self ._assert_object_writing_async (ldb )
13+
You can’t perform that action at this time.
0 commit comments