'Make sure writing and re-reading works.'

def test_write(self, pyqiodev):

    with pyqiodev.open(QIODevice.WriteOnly) as f:
        f.write('foo\n')
        f.write('bar\n')
    pyqiodev.open(QIODevice.ReadOnly)
    assert (pyqiodev.read() == 'foo\nbar\n')
