summaryrefslogtreecommitdiff
path: root/tests/unit/utils/test_qtutils.py
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-12-02 17:30:47 +0100
committerFlorian Bruhin <me@the-compiler.org>2021-12-02 17:30:47 +0100
commited2342a43093a137f5260923eeb5946f4bbb65ee (patch)
treec27fc570fe52e56000c5d0963a5a8d77de89abd1 /tests/unit/utils/test_qtutils.py
parentb9d58034d11674c65dfc5db0d424017cef09ff56 (diff)
downloadqutebrowser-ed2342a43093a137f5260923eeb5946f4bbb65ee.tar.gz
qutebrowser-ed2342a43093a137f5260923eeb5946f4bbb65ee.zip
pylint: Handle consider-using-with
Diffstat (limited to 'tests/unit/utils/test_qtutils.py')
-rw-r--r--tests/unit/utils/test_qtutils.py3
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,