'Test a real write error with /dev/full on supported systems.'

@pytest.mark.posix
@pytest.mark.skipif((not os.path.exists('/dev/full')), reason='Needs    /dev/full.')
def test_write_error_real(self):

    qf = QFile('/dev/full')
    qf.open((QIODevice.WriteOnly | QIODevice.Unbuffered))
    dev = qtutils.PyQIODevice(qf)
    with pytest.raises(OSError, match='No    space    left    on    device'):
        dev.write('foo')
    qf.close()
