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