Commit 9cb624b6 authored by Tres Seaver's avatar Tres Seaver

Revert replacement of 'tempfile.mktemp'.

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