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
87d6cb2d
Commit
87d6cb2d
authored
Feb 28, 2006
by
Christian Theune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- fixed leakages of file handles
parent
d755aeb1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
2 deletions
+21
-2
src/ZODB/Blobs/tests/basic.txt
src/ZODB/Blobs/tests/basic.txt
+5
-0
src/ZODB/Blobs/tests/importexport.txt
src/ZODB/Blobs/tests/importexport.txt
+7
-0
src/ZODB/Blobs/tests/packing.txt
src/ZODB/Blobs/tests/packing.txt
+4
-1
src/ZODB/Blobs/tests/test_config.py
src/ZODB/Blobs/tests/test_config.py
+5
-1
No files found.
src/ZODB/Blobs/tests/basic.txt
View file @
87d6cb2d
...
...
@@ -159,3 +159,8 @@ modifying the ZODB_BLOB_TEMPDIR environment variable:
1
>>> shutil.rmtree(tempdir)
>>> del os.environ['ZODB_BLOB_TEMPDIR']
Some cleanup in this test is needed:
>>> import transaction
>>> transaction.get().abort()
src/ZODB/Blobs/tests/importexport.txt
View file @
87d6cb2d
...
...
@@ -85,11 +85,18 @@ Make sure our data exists:
True
>>> items1['blob2'].open().read() == items2['blob2'].open().read()
True
>>> transaction.get().abort()
Clean up our blob directory:
>>> base_storage1.close()
>>> base_storage2.close()
>>> shutil.rmtree(blob_dir1)
>>> shutil.rmtree(blob_dir2)
>>> os.unlink(exportfile)
>>> os.unlink(storagefile1)
>>> os.unlink(storagefile1+".index")
>>> os.unlink(storagefile1+".tmp")
>>> os.unlink(storagefile2)
>>> os.unlink(storagefile2+".index")
>>> os.unlink(storagefile2+".tmp")
src/ZODB/Blobs/tests/packing.txt
View file @
87d6cb2d
...
...
@@ -30,7 +30,6 @@ Set up:
>>> storagefile = mktemp()
>>> blob_dir = mkdtemp()
UNDOING
=======
...
...
@@ -149,7 +148,11 @@ revision as well as the entire directory:
Clean up our blob directory and database:
>>> shutil.rmtree(blob_dir)
>>> base_storage.close()
>>> os.unlink(storagefile)
>>> os.unlink(storagefile+".index")
>>> os.unlink(storagefile+".tmp")
>>> os.unlink(storagefile+".old")
NON-UNDOING
===========
...
...
src/ZODB/Blobs/tests/test_config.py
View file @
87d6cb2d
...
...
@@ -12,6 +12,7 @@
#
##############################################################################
import
tempfile
,
shutil
,
unittest
import
os
from
ZODB.tests.testConfig
import
ConfigTestBase
from
ZConfig
import
ConfigurationSyntaxError
...
...
@@ -55,8 +56,11 @@ class ZODBBlobConfigTest(BlobConfigTestBase):
</blobstorage>
</zodb>
"""
%
(
self
.
blob_dir
,
path
))
os
.
unlink
(
path
)
os
.
unlink
(
path
+
".index"
)
os
.
unlink
(
path
+
".tmp"
)
def
test_blo
d
_dir_needed
(
self
):
def
test_blo
b
_dir_needed
(
self
):
self
.
assertRaises
(
ConfigurationSyntaxError
,
self
.
_test
,
"""
...
...
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