def test_write_text(filesystem: FileSystemImpl,
                    lpaths: Dict[str, AbstractPath]) -> None:
    data = 'Hello, world!'
    filesystem._write_text(lpaths['new_file'], data)

    content = filesystem._read_text(lpaths['new_file'])
    assert content == data
    filesystem._unlink(lpaths['new_file'])
def test_read_text(filesystem: FileSystemImpl,
                   lpaths: Dict[str, AbstractPath]) -> None:
    content = filesystem._read_text(lpaths['file'], encoding='utf-8')
    assert content == 'Hello World\n'