From 1fcce1287067053ee504ebd5e739649aa695349c Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 8 Jun 2015 07:45:19 +0200 Subject: [PATCH] Fix TestPyQIODevice.failing_open on Windows. --- tests/utils/test_qtutils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/utils/test_qtutils.py b/tests/utils/test_qtutils.py index 8debd0380..9034e8e4e 100644 --- a/tests/utils/test_qtutils.py +++ b/tests/utils/test_qtutils.py @@ -702,7 +702,9 @@ class TestPyQIODevice: dev = qtutils.PyQIODevice(qf) with pytest.raises(OSError) as excinfo: dev.open(QIODevice.WriteOnly) - assert str(excinfo.value) == 'Is a directory' + errors = ['Access is denied.', # Linux/OS X + 'Is a directory'] # Windows + assert str(excinfo.value) in errors assert dev.closed def test_fileno(self, pyqiodev):