@@ -27,6 +27,7 @@ def test_routine_0(glue_database, glue_table, path, use_threads, concurrent_part
2727 use_threads = use_threads ,
2828 concurrent_partitioning = concurrent_partitioning ,
2929 )["paths" ]
30+ assert wr .catalog .get_table_number_of_versions (table = glue_table , database = glue_database ) == 1
3031 wr .s3 .wait_objects_exist (paths = paths , use_threads = use_threads )
3132 df2 = wr .athena .read_sql_table (glue_table , glue_database , use_threads = use_threads )
3233 assert df .shape == df2 .shape
@@ -55,6 +56,7 @@ def test_routine_0(glue_database, glue_table, path, use_threads, concurrent_part
5556 use_threads = use_threads ,
5657 concurrent_partitioning = concurrent_partitioning ,
5758 )["paths" ]
59+ assert wr .catalog .get_table_number_of_versions (table = glue_table , database = glue_database ) == 1
5860 wr .s3 .wait_objects_exist (paths = paths , use_threads = use_threads )
5961 df2 = wr .athena .read_sql_table (glue_table , glue_database , use_threads = use_threads )
6062 assert df .shape == df2 .shape
@@ -83,6 +85,7 @@ def test_routine_0(glue_database, glue_table, path, use_threads, concurrent_part
8385 use_threads = use_threads ,
8486 concurrent_partitioning = concurrent_partitioning ,
8587 )["paths" ]
88+ assert wr .catalog .get_table_number_of_versions (table = glue_table , database = glue_database ) == 1
8689 wr .s3 .wait_objects_exist (paths = paths , use_threads = use_threads )
8790 df2 = wr .athena .read_sql_table (glue_table , glue_database , use_threads = use_threads )
8891 assert len (df .columns ) == len (df2 .columns )
@@ -112,6 +115,7 @@ def test_routine_0(glue_database, glue_table, path, use_threads, concurrent_part
112115 use_threads = use_threads ,
113116 concurrent_partitioning = concurrent_partitioning ,
114117 )["paths" ]
118+ assert wr .catalog .get_table_number_of_versions (table = glue_table , database = glue_database ) == 1
115119 wr .s3 .wait_objects_exist (paths = paths , use_threads = use_threads )
116120 df2 = wr .athena .read_sql_table (glue_table , glue_database , use_threads = use_threads )
117121 assert len (df2 .columns ) == 2
@@ -142,6 +146,7 @@ def test_routine_0(glue_database, glue_table, path, use_threads, concurrent_part
142146 use_threads = use_threads ,
143147 concurrent_partitioning = concurrent_partitioning ,
144148 )["paths" ]
149+ assert wr .catalog .get_table_number_of_versions (table = glue_table , database = glue_database ) == 1
145150 wr .s3 .wait_objects_exist (paths = paths , use_threads = use_threads )
146151 df2 = wr .athena .read_sql_table (glue_table , glue_database , use_threads = use_threads )
147152 assert len (df2 .columns ) == 3
@@ -174,6 +179,7 @@ def test_routine_0(glue_database, glue_table, path, use_threads, concurrent_part
174179 use_threads = use_threads ,
175180 concurrent_partitioning = concurrent_partitioning ,
176181 )["paths" ]
182+ assert wr .catalog .get_table_number_of_versions (table = glue_table , database = glue_database ) == 1
177183 wr .s3 .wait_objects_exist (paths = paths , use_threads = use_threads )
178184 df2 = wr .athena .read_sql_table (glue_table , glue_database , use_threads = use_threads )
179185 assert df .shape == df2 .shape
@@ -204,6 +210,7 @@ def test_routine_0(glue_database, glue_table, path, use_threads, concurrent_part
204210 concurrent_partitioning = concurrent_partitioning ,
205211 use_threads = use_threads ,
206212 )["paths" ]
213+ assert wr .catalog .get_table_number_of_versions (table = glue_table , database = glue_database ) == 1
207214 wr .s3 .wait_objects_exist (paths = paths , use_threads = use_threads )
208215 df2 = wr .athena .read_sql_table (glue_table , glue_database , use_threads = use_threads )
209216 assert len (df2 .columns ) == 2
@@ -235,6 +242,7 @@ def test_routine_0(glue_database, glue_table, path, use_threads, concurrent_part
235242 use_threads = use_threads ,
236243 concurrent_partitioning = concurrent_partitioning ,
237244 )["paths" ]
245+ assert wr .catalog .get_table_number_of_versions (table = glue_table , database = glue_database ) == 1
238246 wr .s3 .wait_objects_exist (paths = paths , use_threads = use_threads )
239247 df2 = wr .athena .read_sql_table (glue_table , glue_database , use_threads = use_threads )
240248 assert len (df2 .columns ) == 3
@@ -268,6 +276,7 @@ def test_routine_1(glue_database, glue_table, path):
268276 parameters = {"num_cols" : str (len (df .columns )), "num_rows" : str (len (df .index ))},
269277 columns_comments = {"c0" : "0" },
270278 )
279+ assert wr .catalog .get_table_number_of_versions (table = glue_table , database = glue_database ) == 1
271280 df2 = wr .athena .read_sql_table (glue_table , glue_database )
272281 assert df .shape == df2 .shape
273282 assert df .c0 .sum () == df2 .c0 .sum ()
@@ -294,6 +303,7 @@ def test_routine_1(glue_database, glue_table, path):
294303 parameters = {"num_cols" : str (len (df .columns )), "num_rows" : str (len (df .index ))},
295304 columns_comments = {"c1" : "1" },
296305 )
306+ assert wr .catalog .get_table_number_of_versions (table = glue_table , database = glue_database ) == 1
297307 df2 = wr .athena .read_sql_table (glue_table , glue_database )
298308 assert df .shape == df2 .shape
299309 assert df .c1 .sum () == df2 .c1 .sum ()
@@ -320,6 +330,7 @@ def test_routine_1(glue_database, glue_table, path):
320330 parameters = {"num_cols" : str (len (df .columns )), "num_rows" : str (len (df .index ) * 2 )},
321331 columns_comments = {"c1" : "1" },
322332 )
333+ assert wr .catalog .get_table_number_of_versions (table = glue_table , database = glue_database ) == 1
323334 df2 = wr .athena .read_sql_table (glue_table , glue_database )
324335 assert len (df .columns ) == len (df2 .columns )
325336 assert len (df .index ) * 2 == len (df2 .index )
@@ -348,6 +359,7 @@ def test_routine_1(glue_database, glue_table, path):
348359 parameters = {"num_cols" : "2" , "num_rows" : "9" },
349360 columns_comments = {"c1" : "1" , "c2" : "2" },
350361 )
362+ assert wr .catalog .get_table_number_of_versions (table = glue_table , database = glue_database ) == 1
351363 df2 = wr .athena .read_sql_table (glue_table , glue_database )
352364 assert len (df2 .columns ) == 2
353365 assert len (df2 .index ) == 9
@@ -376,6 +388,7 @@ def test_routine_1(glue_database, glue_table, path):
376388 parameters = {"num_cols" : "2" , "num_rows" : "2" },
377389 columns_comments = {"c0" : "zero" , "c1" : "one" },
378390 )
391+ assert wr .catalog .get_table_number_of_versions (table = glue_table , database = glue_database ) == 1
379392 df2 = wr .athena .read_sql_table (glue_table , glue_database )
380393 assert df .shape == df2 .shape
381394 assert df .c1 .sum () == df2 .c1 .astype (int ).sum ()
@@ -405,6 +418,7 @@ def test_routine_1(glue_database, glue_table, path):
405418 parameters = {"num_cols" : "2" , "num_rows" : "3" },
406419 columns_comments = {"c0" : "zero" , "c1" : "one" },
407420 )
421+ assert wr .catalog .get_table_number_of_versions (table = glue_table , database = glue_database ) == 1
408422 df2 = wr .athena .read_sql_table (glue_table , glue_database )
409423 assert len (df2 .columns ) == 2
410424 assert len (df2 .index ) == 3
@@ -435,6 +449,7 @@ def test_routine_1(glue_database, glue_table, path):
435449 parameters = {"num_cols" : "3" , "num_rows" : "4" },
436450 columns_comments = {"c0" : "zero" , "c1" : "one" , "c2" : "two" },
437451 )
452+ assert wr .catalog .get_table_number_of_versions (table = glue_table , database = glue_database ) == 1
438453 df2 = wr .athena .read_sql_table (glue_table , glue_database )
439454 assert len (df2 .columns ) == 3
440455 assert len (df2 .index ) == 4
0 commit comments