Fix TestSavefileOpen.test_existing_dir on older Qt.

This commit is contained in:
Florian Bruhin 2015-06-08 07:43:40 +02:00
parent 261c44bea9
commit 00747be9d3

View File

@ -473,7 +473,9 @@ class TestSavefileOpen:
with pytest.raises(OSError) as excinfo:
with qtutils.savefile_open(str(filename)):
pass
assert str(excinfo.value) == "Filename refers to a directory"
errors = ["Filename refers to a directory", # Qt >= 5.4
"Commit failed!"] # older Qt versions
assert str(excinfo.value) in errors
assert tmpdir.listdir() == [filename]
def test_failing_commit(self, tmpdir):