diff options
author | Matěj Cepl <mcepl@redhat.com> | 2012-03-08 23:29:28 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2012-03-08 23:29:28 +0100 |
commit | 884614e79eb99d216eb998a4ca9f504e07667a5f (patch) | |
tree | ff7de8943b83eaa1e92137cb5ea5e8206c7de78e /test | |
parent | bf17bdcec33de1b1218849134ed7ae468f75e946 (diff) | |
download | yamlish-884614e79eb99d216eb998a4ca9f504e07667a5f.tar.gz |
Don't leak tempfiles (and setup.py test should actually do something).0.3
Diffstat (limited to 'test')
-rw-r--r-- | test/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
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() |