def test_table_reset_on_close_issue_190(): query = Query(limit_rows=1) source = [["1", "english"], ["2", "中国人"]] table = Table(source, headers=False, query=query) table.open() table.read_data() == [["1", "english"]] table.open() table.read_data() == [["1", "english"]] table.close()
def test_table_compression_local_csv_zip_multiple_open(): # That's how `tableschema.iter()` acts table = Table("data/table.csv.zip") table.open() assert table.header == ["id", "name"] assert table.read_data() == [["1", "english"], ["2", "中国人"]] table.close() table.open() assert table.header == ["id", "name"] assert table.read_data() == [["1", "english"], ["2", "中国人"]] table.close()