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
bd066aff
Commit
bd066aff
authored
Dec 06, 2002
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OpenRecoveryTest: New test for recovering from problems passing in a
bogus config object.
parent
6e8fbfb4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
lib/python/BDBStorage/tests/test_create.py
lib/python/BDBStorage/tests/test_create.py
+21
-1
No files found.
lib/python/BDBStorage/tests/test_create.py
View file @
bd066aff
...
...
@@ -17,8 +17,10 @@
import
os
import
time
import
unittest
import
BerkeleyTestBase
from
bsddb3Storage.BerkeleyBase
import
BerkeleyConfig
from
bsddb3Storage.tests
import
BerkeleyTestBase
from
bsddb3Storage.Full
import
Full
...
...
@@ -84,6 +86,23 @@ class FullOpenCloseTest(BerkeleyTestBase.FullTestBase):
time
.
sleep
(
20
)
class
OpenRecoveryTest
(
BerkeleyTestBase
.
FullTestBase
):
def
_mk_dbhome
(
self
,
dir
):
self
.
_dir
=
dir
def
checkOpenWithBogusConfig
(
self
):
class
C
:
pass
c
=
C
()
# This instance won't have the necessary attributes, so the creation
# will fail. We want to be sure that everything gets cleaned up
# enough to fix that and create a proper storage.
self
.
assertRaises
(
AttributeError
,
Full
,
self
.
_dir
,
config
=
c
)
c
=
BerkeleyConfig
()
s
=
Full
(
self
.
_dir
,
config
=
c
)
s
.
close
()
def
test_suite
():
suite
=
unittest
.
TestSuite
()
...
...
@@ -91,6 +110,7 @@ def test_suite():
suite
.
addTest
(
unittest
.
makeSuite
(
FullCreateTest
,
'check'
))
suite
.
addTest
(
unittest
.
makeSuite
(
FullOpenExistingTest
,
'check'
))
suite
.
addTest
(
unittest
.
makeSuite
(
FullOpenCloseTest
,
'check'
))
suite
.
addTest
(
unittest
.
makeSuite
(
OpenRecoveryTest
,
'check'
))
return
suite
...
...
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