1313
1414
1515def test_cache_files_empty (tmp_path : Path ):
16- cache = FileCache (tmp_path )
16+ cache = FileCache (
17+ tmp_path ,
18+ schema = None , # type: ignore - testing
19+ batch_size = None , # type: ignore - testing
20+ rows_per_file = None , # type: ignore - testing
21+ compression = None , # type: ignore - testing
22+ )
1723 assert cache ._path == tmp_path
1824 assert cache .get_files () == []
1925 assert cache .get_dataset_files () == []
@@ -22,7 +28,13 @@ def test_cache_files_empty(tmp_path: Path):
2228
2329def test_cache_files_does_not_exist (tmp_path : Path ):
2430 path = tmp_path / "does_not_exist"
25- cache = FileCache (path )
31+ cache = FileCache (
32+ path ,
33+ schema = None , # type: ignore - testing
34+ batch_size = None , # type: ignore - testing
35+ rows_per_file = None , # type: ignore - testing
36+ compression = None , # type: ignore - testing
37+ )
2638 assert cache ._path == path
2739 assert cache .get_files () == []
2840 assert cache .get_dataset_files () == []
@@ -93,6 +105,7 @@ def test_cache_reader(tmp_path: Path):
93105 ]
94106
95107 assert reader .count_rows () == 202
108+ assert reader .count_tables () == 2
96109 assert reader ._schema == schema
97110
98111
@@ -172,6 +185,7 @@ def test_cache_write_columns(tmp_path: Path):
172185
173186 reader = FileCacheReader .load (writer .path )
174187 assert reader .count_rows () == 1000
188+ assert reader .count_tables () == 10
175189 for idx , tbl in enumerate (reader .iterate_tables ()):
176190 assert tbl ["some_int" ].to_pylist () == [
177191 i
@@ -221,6 +235,7 @@ def test_cache_write_rows(tmp_path: Path):
221235
222236 reader = FileCacheReader .load (writer .path )
223237 assert reader .count_rows () == 1000
238+ assert reader .count_tables () == 10
224239 for idx , tbl in enumerate (reader .iterate_tables ()):
225240 assert tbl ["some_int" ].to_pylist () == [
226241 i
@@ -269,6 +284,7 @@ def test_cache_write_table(tmp_path: Path):
269284
270285 reader = FileCacheReader .load (writer .path )
271286 assert reader .count_rows () == 202
287+ assert reader .count_tables () == 2
272288 for tbl in reader .iterate_tables ():
273289 assert tbl ["some_int" ].to_pylist () == [i for i in range (101 )]
274290 assert tbl ["some_float" ].to_pylist () == [i for i in range (101 )]
@@ -311,6 +327,7 @@ def test_cache_delete(tmp_path: Path):
311327
312328 reader = FileCacheReader .load (path = writer .path )
313329 assert reader .count_rows () == 202
330+ assert reader .count_tables () == 2
314331 for tbl in reader .iterate_tables ():
315332 assert tbl ["some_int" ].to_pylist () == [i for i in range (101 )]
316333 assert tbl ["some_float" ].to_pylist () == [i for i in range (101 )]
0 commit comments