From 884614e79eb99d216eb998a4ca9f504e07667a5f Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Thu, 8 Mar 2012 23:29:28 +0100 Subject: Don't leak tempfiles (and setup.py test should actually do something). --- test/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/__init__.py b/test/__init__.py index cf6dcde..83cdd6d 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -63,7 +63,7 @@ def _create_output_test(test_src, tested_function): logging.debug("out:\n%s", textwrap.dedent(test_src['out'])) want = yaml.load(textwrap.dedent(test_src['out'])) logging.debug("want:\n%s", want) - with tempfile.NamedTemporaryFile(delete=False) as test_file: + with tempfile.NamedTemporaryFile() as test_file: tested_function(test_src['in'], test_file) test_file.seek(0) got_str = test_file.read() -- cgit