def test_file_data(self, data, tmpdir): txt_file = tmpdir.join("temporary.txt") txt_file.write("\n".join(data)) assert read_plain_text(txt_file.strpath) == data
def test_file_not_found(self): with pytest.raises(IOError): read_plain_text("/this __ / file / doesnt/exist")