test_editor: Skip un{read,writ}able on Windows.

Windows doesn't really have working file permissions...
This commit is contained in:
Florian Bruhin 2015-08-19 10:18:55 +02:00
parent 086c6c81a1
commit 3d4fd2652b

View File

@ -107,6 +107,7 @@ class TestFileHandling:
editor._proc.finished.emit(0, QProcess.CrashExit)
assert not os.path.exists(filename)
@pytest.mark.posix
def test_unreadable(self, message_mock, editor):
"""Test file handling when closing with an unreadable file."""
editor.edit("")
@ -118,6 +119,7 @@ class TestFileHandling:
msg = message_mock.getmsg(message_mock.Level.error)
assert msg.text.startswith("Failed to read back edited file: ")
@pytest.mark.posix
def test_unwritable(self, monkeypatch, message_mock, editor, tmpdir):
"""Test file handling when the initial file is not writable."""
tmpdir.chmod(0)