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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZODB
Commits
fe7e5e3b
Commit
fe7e5e3b
authored
Oct 26, 2008
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use setupstack, rather than the older and duplicative facilities
that were removed from ZODB.tests.util.
parent
7a31b87b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
18 deletions
+11
-18
src/ZODB/tests/testFileStorage.py
src/ZODB/tests/testFileStorage.py
+4
-2
src/ZODB/tests/testblob.py
src/ZODB/tests/testblob.py
+4
-15
src/ZODB/tests/testconflictresolution.py
src/ZODB/tests/testconflictresolution.py
+3
-1
No files found.
src/ZODB/tests/testFileStorage.py
View file @
fe7e5e3b
...
...
@@ -15,6 +15,7 @@ import os, unittest
import
transaction
import
ZODB.FileStorage
import
ZODB.tests.util
import
zope.testing.setupstack
from
ZODB
import
POSException
from
ZODB
import
DB
...
...
@@ -564,8 +565,9 @@ def test_suite():
FileStorageRecoveryTest
,
FileStorageNoRestoreRecoveryTest
,
SlowFileStorageTest
]:
suite
.
addTest
(
unittest
.
makeSuite
(
klass
,
"check"
))
suite
.
addTest
(
doctest
.
DocTestSuite
(
setUp
=
ZODB
.
tests
.
util
.
setUp
,
tearDown
=
ZODB
.
tests
.
util
.
tearDown
))
suite
.
addTest
(
doctest
.
DocTestSuite
(
setUp
=
zope
.
testing
.
setupstack
.
setUpDirectory
,
tearDown
=
zope
.
testing
.
setupstack
.
tearDown
))
return
suite
if
__name__
==
'__main__'
:
...
...
src/ZODB/tests/testblob.py
View file @
fe7e5e3b
...
...
@@ -614,19 +614,8 @@ def is_blob_record():
"""
def
setUp
(
test
):
ZODB
.
tests
.
util
.
setUp
(
test
)
def
rmtree
(
path
):
for
path
,
dirs
,
files
in
os
.
walk
(
path
,
False
):
for
fname
in
files
:
fname
=
os
.
path
.
join
(
path
,
fname
)
os
.
chmod
(
fname
,
stat
.
S_IWUSR
)
os
.
remove
(
fname
)
for
dname
in
dirs
:
dname
=
os
.
path
.
join
(
path
,
dname
)
os
.
rmdir
(
dname
)
os
.
rmdir
(
path
)
test
.
globs
[
'rmtree'
]
=
rmtree
zope
.
testing
.
setupstack
.
setUpDirectory
(
test
)
test
.
globs
[
'rmtree'
]
=
zope
.
testing
.
setupstack
.
rmtree
def
test_suite
():
suite
=
unittest
.
TestSuite
()
...
...
@@ -636,11 +625,11 @@ def test_suite():
"blob_packing.txt"
,
"blob_importexport.txt"
,
"blob_consume.txt"
,
"blob_tempdir.txt"
,
setUp
=
setUp
,
tearDown
=
ZODB
.
tests
.
util
.
tearDown
,
tearDown
=
zope
.
testing
.
setupstack
.
tearDown
,
))
suite
.
addTest
(
doctest
.
DocTestSuite
(
setUp
=
setUp
,
tearDown
=
ZODB
.
tests
.
util
.
tearDown
,
tearDown
=
zope
.
testing
.
setupstack
.
tearDown
,
checker
=
renormalizing
.
RENormalizing
([
(
re
.
compile
(
r'\
%(sep)s
\%(sep)s'
%
dict
(
sep
=
os
.
path
.
sep
)),
'/'
),
(
re
.
compile
(
r'\
%(sep)s
' % dict(sep=os.path.sep)), '
/
'),
...
...
src/ZODB/tests/testconflictresolution.py
View file @
fe7e5e3b
...
...
@@ -15,16 +15,18 @@
$Id$
"""
import
unittest
from
zope.testing
import
doctest
,
module
from
zope.testing
import
doctest
,
module
,
setupstack
def
setUp
(
test
):
module
.
setUp
(
test
,
'ConflictResolution_txt'
)
setupstack
.
setUpDirectory
(
test
)
def
tearDown
(
test
):
test
.
globs
[
'db'
].
close
()
test
.
globs
[
'db1'
].
close
()
test
.
globs
[
'db2'
].
close
()
module
.
tearDown
(
test
)
setupstack
.
tearDown
(
test
)
def
test_suite
():
return
unittest
.
TestSuite
((
...
...
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