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
8e8798e7
Commit
8e8798e7
authored
Sep 11, 2003
by
Chris Withers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes to make BDBStorage tests display a message if they're run when BDBStorage is not available.
parent
d8f18ad8
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
45 deletions
+54
-45
lib/python/BDBStorage/tests/BerkeleyTestBase.py
lib/python/BDBStorage/tests/BerkeleyTestBase.py
+18
-0
lib/python/BDBStorage/tests/test_autopack.py
lib/python/BDBStorage/tests/test_autopack.py
+9
-10
lib/python/BDBStorage/tests/test_create.py
lib/python/BDBStorage/tests/test_create.py
+8
-7
lib/python/BDBStorage/tests/test_storage_api.py
lib/python/BDBStorage/tests/test_storage_api.py
+5
-7
lib/python/BDBStorage/tests/test_virgin.py
lib/python/BDBStorage/tests/test_virgin.py
+4
-6
lib/python/BDBStorage/tests/test_whitebox.py
lib/python/BDBStorage/tests/test_whitebox.py
+6
-8
lib/python/BDBStorage/tests/test_zodb_simple.py
lib/python/BDBStorage/tests/test_zodb_simple.py
+4
-7
No files found.
lib/python/BDBStorage/tests/BerkeleyTestBase.py
View file @
8e8798e7
...
...
@@ -18,7 +18,10 @@
import
os
import
errno
import
shutil
import
sys
import
unittest
import
BDBStorage
from
BDBStorage.BerkeleyBase
import
BerkeleyConfig
from
ZODB.tests.StorageTestBase
import
StorageTestBase
...
...
@@ -77,3 +80,18 @@ class MinimalTestBase(BerkeleyTestBase):
class
FullTestBase
(
BerkeleyTestBase
):
from
BDBStorage
import
BDBFullStorage
ConcreteStorage
=
BDBFullStorage
.
BDBFullStorage
def
makeSuite
(
*
args
,
**
kw
):
prefix
=
kw
.
get
(
'prefix'
,
'check'
)
level
=
kw
.
get
(
'level'
)
suite
=
unittest
.
TestSuite
()
if
level
:
suite
.
level
=
level
if
BDBStorage
.
is_available
:
for
klass
in
args
:
suite
.
addTest
(
unittest
.
makeSuite
(
klass
,
prefix
))
else
:
sys
.
stderr
.
write
(
"BDBStorage not available, tests disabled
\
n
"
)
return
suite
lib/python/BDBStorage/tests/test_autopack.py
View file @
8e8798e7
...
...
@@ -533,16 +533,15 @@ class TestMinimalClassicPackRaceCondition(RaceConditionBase):
def
test_suite
():
suite
=
unittest
.
TestSuite
()
suite
.
level
=
2
if
BDBStorage
.
is_available
:
suite
.
addTest
(
unittest
.
makeSuite
(
TestAutopack
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestAutomaticClassicPack
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestMinimalPack
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestFullClassicPackRaceCondition
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestMinimalClassicPackRaceCondition
))
return
suite
return
BDBStorage
.
tests
.
BerkeleyTestBase
.
makeSuite
(
TestAutopack
,
TestAutomaticClassicPack
,
TestMinimalPack
,
TestFullClassicPackRaceCondition
,
TestMinimalClassicPackRaceCondition
,
prefix
=
'test'
,
level
=
2
)
if
__name__
==
'__main__'
:
...
...
lib/python/BDBStorage/tests/test_create.py
View file @
8e8798e7
...
...
@@ -111,13 +111,14 @@ class OpenRecoveryTest(BerkeleyTestBase.FullTestBase):
def
test_suite
():
suite
=
unittest
.
TestSuite
()
if
BDBStorage
.
is_available
:
suite
.
addTest
(
unittest
.
makeSuite
(
MinimalCreateTest
))
suite
.
addTest
(
unittest
.
makeSuite
(
FullCreateTest
))
suite
.
addTest
(
unittest
.
makeSuite
(
FullOpenExistingTest
))
suite
.
addTest
(
unittest
.
makeSuite
(
FullOpenCloseTest
))
suite
.
addTest
(
unittest
.
makeSuite
(
OpenRecoveryTest
))
return
BDBStorage
.
tests
.
BerkeleyTestBase
.
makeSuite
(
MinimalCreateTest
,
FullCreateTest
,
FullOpenExistingTest
,
FullOpenCloseTest
,
OpenRecoveryTest
,
prefix
=
'test'
)
return
suite
...
...
lib/python/BDBStorage/tests/test_storage_api.py
View file @
8e8798e7
...
...
@@ -77,13 +77,11 @@ class FullRecoveryTest(BerkeleyTestBase.FullTestBase,
def
test_suite
():
suite
=
unittest
.
TestSuite
()
if
BDBStorage
.
is_available
:
suite
.
addTest
(
unittest
.
makeSuite
(
FullTest
,
'check'
))
suite
.
addTest
(
unittest
.
makeSuite
(
FullRecoveryTest
,
'check'
))
suite
.
addTest
(
unittest
.
makeSuite
(
MinimalTest
,
'check'
))
return
suite
return
BDBStorage
.
tests
.
BerkeleyTestBase
.
makeSuite
(
FullTest
,
FullRecoveryTest
,
MinimalTest
,
)
if
__name__
==
'__main__'
:
...
...
lib/python/BDBStorage/tests/test_virgin.py
View file @
8e8798e7
...
...
@@ -46,12 +46,10 @@ class MinimalNewInsertsTest(ZODBTestBase, InsertMixin):
def
test_suite
():
suite
=
unittest
.
TestSuite
()
if
BDBStorage
.
is_available
:
suite
.
addTest
(
unittest
.
makeSuite
(
MinimalNewInsertsTest
,
'check'
))
suite
.
addTest
(
unittest
.
makeSuite
(
FullNewInsertsTest
,
'check'
))
return
suite
return
BDBStorage
.
tests
.
BerkeleyTestBase
.
makeSuite
(
MinimalNewInsertsTest
,
FullNewInsertsTest
,
)
if
__name__
==
'__main__'
:
...
...
lib/python/BDBStorage/tests/test_whitebox.py
View file @
8e8798e7
...
...
@@ -246,14 +246,12 @@ class WhiteboxHighLevelFull(ZODBTestBase):
def
test_suite
():
suite
=
unittest
.
TestSuite
()
if
BDBStorage
.
is_available
:
suite
.
addTest
(
unittest
.
makeSuite
(
WhiteboxLowLevelMinimal
,
'check'
))
suite
.
addTest
(
unittest
.
makeSuite
(
WhiteboxHighLevelMinimal
,
'check'
))
suite
.
addTest
(
unittest
.
makeSuite
(
WhiteboxLowLevelFull
,
'check'
))
suite
.
addTest
(
unittest
.
makeSuite
(
WhiteboxHighLevelFull
,
'check'
))
return
suite
return
BDBStorage
.
tests
.
BerkeleyTestBase
.
makeSuite
(
WhiteboxLowLevelMinimal
,
WhiteboxHighLevelMinimal
,
WhiteboxLowLevelFull
,
WhiteboxHighLevelFull
,
)
if
__name__
==
'__main__'
:
...
...
lib/python/BDBStorage/tests/test_zodb_simple.py
View file @
8e8798e7
...
...
@@ -78,13 +78,10 @@ class FullCommitAndRead(ZODBTestBase, CommitAndRead):
def
test_suite
():
suite
=
unittest
.
TestSuite
()
if
BDBStorage
.
is_available
:
suite
.
addTest
(
unittest
.
makeSuite
(
MinimalCommitAndRead
,
'check'
))
suite
.
addTest
(
unittest
.
makeSuite
(
FullCommitAndRead
,
'check'
))
return
suite
return
BDBStorage
.
tests
.
BerkeleyTestBase
.
makeSuite
(
MinimalCommitAndRead
,
FullCommitAndRead
)
if
__name__
==
'__main__'
:
unittest
.
main
(
defaultTest
=
'test_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