diff options
| author | Sebastian Thiel <byronimo@gmail.com> | 2011-05-04 19:33:36 +0200 |
|---|---|---|
| committer | Sebastian Thiel <byronimo@gmail.com> | 2011-05-04 19:33:36 +0200 |
| commit | d20dadfde5824dcabda351f75a6784d616b2fd23 (patch) | |
| tree | 8b75a3bab4a76d57cacb53b5cb54f20e23951a3a /gitdb/test/db | |
| parent | e24994109f01bd315fd6a2aaecbbfcdd05bd0586 (diff) | |
| download | gitdb-d20dadfde5824dcabda351f75a6784d616b2fd23.tar.gz | |
First rename session, db/test_base.py works, but there is much more work to do
Diffstat (limited to 'gitdb/test/db')
| -rw-r--r-- | gitdb/test/db/lib.py | 7 | ||||
| -rw-r--r-- | gitdb/test/db/test_loose.py | 4 | ||||
| -rw-r--r-- | gitdb/test/db/test_mem.py | 4 |
3 files changed, 11 insertions, 4 deletions
diff --git a/gitdb/test/db/lib.py b/gitdb/test/db/lib.py index 416c8c5..5f4f9c3 100644 --- a/gitdb/test/db/lib.py +++ b/gitdb/test/db/lib.py @@ -13,6 +13,10 @@ from gitdb.test.lib import ( from gitdb.stream import Sha1Writer +# import database types we want to support +# they will be set to None if the respective library could not be loaded +from gitdb.db.py import PureGitDB + from gitdb.base import ( IStream, OStream, @@ -36,6 +40,9 @@ class TestDBBase(TestBase): two_lines = "1234\nhello world" all_data = (two_lines, ) + # all supported database types. Add your own type + ref_db_types = (PureGitDB, ) + def _assert_object_writing_simple(self, db): # write a bunch of objects and query their streams and info null_objs = db.size() diff --git a/gitdb/test/db/test_loose.py b/gitdb/test/db/test_loose.py index ee2d78d..49353dc 100644 --- a/gitdb/test/db/test_loose.py +++ b/gitdb/test/db/test_loose.py @@ -3,7 +3,7 @@ # This module is part of GitDB and is released under # the New BSD License: http://www.opensource.org/licenses/bsd-license.php from lib import * -from gitdb.db import LooseObjectDB +from gitdb.db import PureLooseObjectODB from gitdb.exc import BadObject from gitdb.util import bin_to_hex @@ -11,7 +11,7 @@ class TestLooseDB(TestDBBase): @with_rw_directory def test_basics(self, path): - ldb = LooseObjectDB(path) + ldb = PureLooseObjectODB(path) # write data self._assert_object_writing(ldb) diff --git a/gitdb/test/db/test_mem.py b/gitdb/test/db/test_mem.py index 188cb0a..f88fca7 100644 --- a/gitdb/test/db/test_mem.py +++ b/gitdb/test/db/test_mem.py @@ -5,7 +5,7 @@ from lib import * from gitdb.db import ( MemoryDB, - LooseObjectDB + PureLooseObjectODB ) class TestMemoryDB(TestDBBase): @@ -18,7 +18,7 @@ class TestMemoryDB(TestDBBase): self._assert_object_writing_simple(mdb) # test stream copy - ldb = LooseObjectDB(path) + ldb = PureLooseObjectODB(path) assert ldb.size() == 0 num_streams_copied = mdb.stream_copy(mdb.sha_iter(), ldb) assert num_streams_copied == mdb.size() |
