Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
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
Nicolas Wavrant
ZODB
Commits
5bd316ae
Commit
5bd316ae
authored
Mar 03, 2004
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert testSets DeprecationWarnings into exceptions.
parent
61a38522
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
src/ZODB/tests/testDB.py
src/ZODB/tests/testDB.py
+9
-2
No files found.
src/ZODB/tests/testDB.py
View file @
5bd316ae
...
...
@@ -14,6 +14,7 @@
import
os
import
time
import
unittest
import
warnings
import
ZODB
import
ZODB.FileStorage
...
...
@@ -48,9 +49,15 @@ class DBTests(unittest.TestCase):
def
testSets
(
self
):
# test set methods that have non-trivial implementations
self
.
db
.
setCacheDeactivateAfter
(
12
)
# deprecated
warnings
.
filterwarnings
(
"error"
,
category
=
DeprecationWarning
)
self
.
assertRaises
(
DeprecationWarning
,
self
.
db
.
setCacheDeactivateAfter
,
12
)
self
.
assertRaises
(
DeprecationWarning
,
self
.
db
.
setVersionCacheDeactivateAfter
,
12
)
# XXX There is no API call for removing the warning we just
# added, but filters appears to be a public variable.
del
warnings
.
filters
[
0
]
self
.
db
.
setCacheSize
(
15
)
self
.
db
.
setVersionCacheDeactivateAfter
(
12
)
# deprecated
self
.
db
.
setVersionCacheSize
(
15
)
def
test_removeVersionPool
(
self
):
...
...
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