Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
fc30346f
Commit
fc30346f
authored
Sep 22, 2008
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Addressed various windows test issues.
parent
5d112706
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
10 deletions
+34
-10
src/ZEO/tests/test_cache.py
src/ZEO/tests/test_cache.py
+2
-0
src/ZODB/tests/blob_packing.txt
src/ZODB/tests/blob_packing.txt
+2
-2
src/ZODB/tests/blob_transaction.txt
src/ZODB/tests/blob_transaction.txt
+2
-3
src/ZODB/tests/testblob.py
src/ZODB/tests/testblob.py
+28
-5
No files found.
src/ZEO/tests/test_cache.py
View file @
fc30346f
...
@@ -343,6 +343,8 @@ __test__ = dict(
...
@@ -343,6 +343,8 @@ __test__ = dict(
>>> logger.setLevel(logging.NOTSET)
>>> logger.setLevel(logging.NOTSET)
>>> logger.removeHandler(handler)
>>> logger.removeHandler(handler)
>>> cache.close()
"""
"""
)
)
...
...
src/ZODB/tests/blob_packing.txt
View file @
fc30346f
...
@@ -146,7 +146,7 @@ revision as well as the entire directory:
...
@@ -146,7 +146,7 @@ revision as well as the entire directory:
Clean up our blob directory and database:
Clean up our blob directory and database:
>>>
shutil.
rmtree(blob_dir)
>>> rmtree(blob_dir)
>>> base_storage.close()
>>> base_storage.close()
>>> os.unlink(storagefile)
>>> os.unlink(storagefile)
>>> os.unlink(storagefile+".index")
>>> os.unlink(storagefile+".index")
...
@@ -273,4 +273,4 @@ knowledge that the underlying storage's pack method is also called:
...
@@ -273,4 +273,4 @@ knowledge that the underlying storage's pack method is also called:
Clean up our blob directory:
Clean up our blob directory:
>>>
shutil.
rmtree(blob_dir)
>>> rmtree(blob_dir)
src/ZODB/tests/blob_transaction.txt
View file @
fc30346f
...
@@ -364,6 +364,5 @@ We don't need the storage directory and databases anymore::
...
@@ -364,6 +364,5 @@ We don't need the storage directory and databases anymore::
>>> tm1.abort()
>>> tm1.abort()
>>> tm2.abort()
>>> tm2.abort()
>>> database.close()
>>> database.close()
>>> import shutil
>>> rmtree(blob_dir)
>>> shutil.rmtree(blob_dir)
>>> rmtree(blob_dir2)
>>> shutil.rmtree(blob_dir2)
src/ZODB/tests/testblob.py
View file @
fc30346f
...
@@ -12,9 +12,9 @@
...
@@ -12,9 +12,9 @@
#
#
##############################################################################
##############################################################################
import
base64
,
os
,
shutil
,
tempfile
,
unittest
import
base64
,
os
,
re
,
shutil
,
stat
,
sys
,
tempfile
,
unittest
import
time
import
time
from
zope.testing
import
doctest
from
zope.testing
import
doctest
,
renormalizing
import
ZODB.tests.util
import
ZODB.tests.util
from
StringIO
import
StringIO
from
StringIO
import
StringIO
...
@@ -474,6 +474,11 @@ def secure_blob_directory():
...
@@ -474,6 +474,11 @@ def secure_blob_directory():
"""
"""
# On windows, we can't create secure blob directories, at least not
# with APIs in the standard library, so there's no point in testing
# this.
if
sys
.
platform
==
'win32'
:
del
secure_blob_directory
def
loadblob_tmpstore
():
def
loadblob_tmpstore
():
"""
"""
...
@@ -521,13 +526,27 @@ def loadblob_tmpstore():
...
@@ -521,13 +526,27 @@ def loadblob_tmpstore():
>>> database.close()
>>> database.close()
>>> import shutil
>>> import shutil
>>>
shutil.
rmtree(blob_dir)
>>> rmtree(blob_dir)
>>> os.unlink(storagefile)
>>> os.unlink(storagefile)
>>> os.unlink(storagefile+".index")
>>> os.unlink(storagefile+".index")
>>> os.unlink(storagefile+".tmp")
>>> os.unlink(storagefile+".tmp")
"""
"""
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
def
test_suite
():
def
test_suite
():
suite
=
unittest
.
TestSuite
()
suite
=
unittest
.
TestSuite
()
...
@@ -536,12 +555,16 @@ def test_suite():
...
@@ -536,12 +555,16 @@ def test_suite():
"blob_basic.txt"
,
"blob_connection.txt"
,
"blob_transaction.txt"
,
"blob_basic.txt"
,
"blob_connection.txt"
,
"blob_transaction.txt"
,
"blob_packing.txt"
,
"blob_importexport.txt"
,
"blob_consume.txt"
,
"blob_packing.txt"
,
"blob_importexport.txt"
,
"blob_consume.txt"
,
"blob_tempdir.txt"
,
"blob_tempdir.txt"
,
setUp
=
ZODB
.
tests
.
util
.
setUp
,
setUp
=
setUp
,
tearDown
=
ZODB
.
tests
.
util
.
tearDown
,
tearDown
=
ZODB
.
tests
.
util
.
tearDown
,
))
))
suite
.
addTest
(
doctest
.
DocTestSuite
(
suite
.
addTest
(
doctest
.
DocTestSuite
(
setUp
=
ZODB
.
tests
.
util
.
setUp
,
setUp
=
setUp
,
tearDown
=
ZODB
.
tests
.
util
.
tearDown
,
tearDown
=
ZODB
.
tests
.
util
.
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)), '
/
'),
]),
))
))
suite.addTest(unittest.makeSuite(BlobUndoTests))
suite.addTest(unittest.makeSuite(BlobUndoTests))
...
...
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