summaryrefslogtreecommitdiff
path: root/tests/unit/utils/test_qtutils.py
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-03-24 12:21:54 +0100
committerFlorian Bruhin <me@the-compiler.org>2021-03-24 12:21:54 +0100
commit46b44b1b2d9e6a934b02b759f564233b50578583 (patch)
treeac319565986a025638b812bc47cab7b024fd5bde /tests/unit/utils/test_qtutils.py
parent27ceb8196db3986c6c6df55152782f644be6f8c2 (diff)
downloadqutebrowser-46b44b1b2d9e6a934b02b759f564233b50578583.tar.gz
qutebrowser-46b44b1b2d9e6a934b02b759f564233b50578583.zip
Avoid missing_ok
Added in Python 3.8, see #6291
Diffstat (limited to 'tests/unit/utils/test_qtutils.py')
-rw-r--r--tests/unit/utils/test_qtutils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/unit/utils/test_qtutils.py b/tests/unit/utils/test_qtutils.py
index c0832c9fb..949855343 100644
--- a/tests/unit/utils/test_qtutils.py
+++ b/tests/unit/utils/test_qtutils.py
@@ -520,7 +520,10 @@ if test_file is not None:
def clean_up_python_testfile():
"""Clean up the python testfile after tests if tests didn't."""
yield
- pathlib.Path(test_file.TESTFN).unlink(missing_ok=True)
+ try:
+ pathlib.Path(test_file.TESTFN).unlink()
+ except FileNotFoundError:
+ pass
class PyIODeviceTestMixin: