diff options
Diffstat (limited to 'tests/unit/utils/test_qtutils.py')
-rw-r--r-- | tests/unit/utils/test_qtutils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/unit/utils/test_qtutils.py b/tests/unit/utils/test_qtutils.py index 2d98feece..d78a132bb 100644 --- a/tests/unit/utils/test_qtutils.py +++ b/tests/unit/utils/test_qtutils.py @@ -559,7 +559,8 @@ if test_file is not None: qiodev.mode = mode # Create empty TESTFN file because the Python tests try to unlink # it.after the test. - open(test_file.TESTFN, 'w', encoding='utf-8').close() + with open(test_file.TESTFN, 'w', encoding='utf-8'): + pass return qiodev class PyAutoFileTests(PyIODeviceTestMixin, test_file.AutoFileTests, |