Commit 166c5b76 authored by Tres Seaver's avatar Tres Seaver

Moar resource leak patchage.

parent 79bcc422
......@@ -61,7 +61,7 @@ class ZODBConfigTest(ConfigTestBase):
""")
def test_file_config1(self):
path = tempfile.mktemp()
with tempfile.NamedTemporaryFile(prefix='Cfg') as f:
self._test(
"""
<zodb>
......@@ -69,10 +69,10 @@ class ZODBConfigTest(ConfigTestBase):
path %s
</filestorage>
</zodb>
""" % path)
""" % f.name)
def test_file_config2(self):
path = tempfile.mktemp()
with tempfile.NamedTemporaryFile(prefix='Cfg') as f:
cfg = """
<zodb>
<filestorage>
......@@ -81,7 +81,7 @@ class ZODBConfigTest(ConfigTestBase):
read-only true
</filestorage>
</zodb>
""" % path
""" % f.name
self.assertRaises(ReadOnlyError, self._test, cfg)
def test_demo_config(self):
......
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