Commit 561a5c13 authored by Jim Fulton's avatar Jim Fulton

Added missing resource-release code.

parent 2c6e83c3
......@@ -988,6 +988,7 @@ transaction, we'll get a result:
>>> sorted([int(u64(oid)) for (oid, _) in oids])
[0, 101, 102, 103, 104]
>>> fs.close()
"""
def tpc_finish_error():
......
......@@ -273,6 +273,7 @@ share the same class:
>>> file = connection.exportFile(p._p_oid)
>>> file.seek(0)
>>> cp = connection.importFile(file)
>>> file.close()
>>> cp.color
'blue'
......@@ -282,6 +283,7 @@ share the same class:
>>> cp.__class__ is p.__class__
True
>>> tm.abort()
XXX test abort of import
......@@ -57,6 +57,7 @@ Now, after closing all readers and writers we can consume files again::
>>> blob_read.read()
'I am another blob.'
>>> blob_read.close()
Edge cases
==========
......
......@@ -21,6 +21,8 @@ The created file is in the default temporary directory::
>>> w.name.startswith(tempfile.gettempdir())
True
>>> w.close()
Case 2: Blobs that are in a database
====================================
......@@ -45,3 +47,5 @@ writing and expect the file to be in the blob temporary directory::
>>> w = blob.open('w')
>>> w.name.startswith(os.path.join(blob_dir, 'tmp'))
True
>>> w.close()
......@@ -485,11 +485,12 @@ there are:
Of course, calling lastInvalidations on an empty storage refturns no data:
>>> fs.close()
>>> db.close()
>>> fs = ZODB.FileStorage.FileStorage('t.fs', create=True)
>>> list(fs.lastInvalidations(10))
[]
>>> fs.close()
"""
def deal_with_finish_failures():
......
......@@ -527,6 +527,7 @@ def loadblob_tmpstore():
Clean up:
>>> tmpstore.close()
>>> database.close()
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment