Fix TestPyQIODevice.failing_open on Windows.

This commit is contained in:
Florian Bruhin 2015-06-08 07:45:19 +02:00
parent 00747be9d3
commit 1fcce12870

View File

@ -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):