Permalink
Browse files

Make semidbm a package

  • Loading branch information...
1 parent 9aa6767 commit 20e9f8fdd7a0ac488a83005fbffadce6a5b91a6a @jamesls committed Mar 14, 2012
Showing with 8 additions and 2 deletions.
  1. +6 −0 semidbm/__init__.py
  2. 0 semidbm.py → semidbm/db.py
  3. +2 −2 test_semidbm.py
View
@@ -0,0 +1,6 @@
+import semidbm.db
+open = semidbm.db.open
+
+from semidbm.db import DBMError
+from semidbm.db import DBMLoadError
+from semidbm.db import DBMChecksumError
File renamed without changes.
View
@@ -251,7 +251,7 @@ def test_compact_then_write_data(self):
class TestRemapping(SemiDBMTest):
def setUp(self):
super(TestRemapping, self).setUp()
- self.original = semidbm._MAPPED_LOAD_PAGES
+ self.original = semidbm.db._MAPPED_LOAD_PAGES
# Change the number of mapped pages to 1 so that we don't have to write
# as much data. The logic in the code uses this constant, so changing
# the value of the constant won't affect the code logic, it'll just
@@ -374,7 +374,7 @@ def test_checksum_failure(self):
class TestReadOnlyModeMMapped(TestReadOnlyMode):
def open_db_file(self, **kwargs):
- return semidbm._SemiDBMReadOnlyMMap(self.dbdir, **kwargs)
+ return semidbm.db._SemiDBMReadOnlyMMap(self.dbdir, **kwargs)
def test_load_empty_db(self):
db = semidbm.open(self.dbdir, 'c')

0 comments on commit 20e9f8f

Please sign in to comment.