Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
044c4c02
Commit
044c4c02
authored
Apr 11, 2001
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Base class for all Berkeley storage tests
parent
7fee0890
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
lib/python/BDBStorage/tests/BerkeleyTestBase.py
lib/python/BDBStorage/tests/BerkeleyTestBase.py
+39
-0
No files found.
lib/python/BDBStorage/tests/BerkeleyTestBase.py
0 → 100644
View file @
044c4c02
# Basic test framework class for both the Full and Minimal Berkeley storages
import
os
from
StorageTestBase
import
StorageTestBase
DBHOME
=
'test-db'
class
BerkeleyTestBase
(
StorageTestBase
):
def
setUp
(
self
):
StorageTestBase
.
setUp
(
self
)
os
.
mkdir
(
DBHOME
)
try
:
self
.
_storage
=
self
.
ConcreteStorage
(
DBHOME
)
except
:
self
.
tearDown
()
raise
def
tearDown
(
self
):
# If the tests exited with any uncommitted objects, they'll blow up
# subsequent tests because the next transaction commit will try to
# commit those object. But they're tied to closed databases, so
# that's broken. Aborting the transaction now saves us the headache.
StorageTestBase
.
tearDown
(
self
)
for
file
in
os
.
listdir
(
DBHOME
):
os
.
unlink
(
os
.
path
.
join
(
DBHOME
,
file
))
os
.
removedirs
(
DBHOME
)
class
MinimalTestBase
(
BerkeleyTestBase
):
import
Minimal
ConcreteStorage
=
Minimal
.
Minimal
class
FullTestBase
(
BerkeleyTestBase
):
import
Full
ConcreteStorage
=
Full
.
Full
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment