diff options
author | Florian Bruhin <me@the-compiler.org> | 2021-03-24 12:21:54 +0100 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2021-03-24 12:21:54 +0100 |
commit | 46b44b1b2d9e6a934b02b759f564233b50578583 (patch) | |
tree | ac319565986a025638b812bc47cab7b024fd5bde | |
parent | 27ceb8196db3986c6c6df55152782f644be6f8c2 (diff) | |
download | qutebrowser-46b44b1b2d9e6a934b02b759f564233b50578583.tar.gz qutebrowser-46b44b1b2d9e6a934b02b759f564233b50578583.zip |
Avoid missing_ok
Added in Python 3.8, see #6291
-rw-r--r-- | tests/unit/utils/test_qtutils.py | 5 |
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: |