diff options
author | Florian Bruhin <me@the-compiler.org> | 2020-05-26 20:20:56 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2020-05-26 20:25:08 +0200 |
commit | e8b0ce7597627a5b5312a214a84ff2aed9bcdfe0 (patch) | |
tree | be8423aa6432e4e014743b884ec6fff69945efac /tests/unit/utils/test_qtutils.py | |
parent | 0d191a47bb34959102ddc2e1ecc07896dab3eda6 (diff) | |
download | qutebrowser-e8b0ce7597627a5b5312a214a84ff2aed9bcdfe0.tar.gz qutebrowser-e8b0ce7597627a5b5312a214a84ff2aed9bcdfe0.zip |
Add filename if QtOSError is used with QFileDevice
If we have a filename available, let's add it to the error message.
This also effectively reverts 00747be9d3790534e8b32464605d1b5b6c2d6627 since
that's not needed anymore (Qt 5.7 is the oldest supported release).
Diffstat (limited to 'tests/unit/utils/test_qtutils.py')
-rw-r--r-- | tests/unit/utils/test_qtutils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/utils/test_qtutils.py b/tests/unit/utils/test_qtutils.py index 150a03f6e..81d198946 100644 --- a/tests/unit/utils/test_qtutils.py +++ b/tests/unit/utils/test_qtutils.py @@ -467,9 +467,9 @@ class TestSavefileOpen: with pytest.raises(OSError) as excinfo: with qtutils.savefile_open(str(filename)): pass - errors = ["Filename refers to a directory", # Qt >= 5.4 - "Commit failed!"] # older Qt versions - assert str(excinfo.value) in errors + + msg = "Filename refers to a directory: {!r}".format(str(filename)) + assert str(excinfo.value) == msg assert tmpdir.listdir() == [filename] def test_failing_flush(self, tmpdir): |