@@ -247,7 +247,8 @@ def test_build_idx_grib_mapping(self):
247
247
f"{ mapping_fname } .idx_grib_mapping.parquet" ,
248
248
)
249
249
# Build the mapping from idx to cfgrib metadata and assert it matches the fixture
250
- pd .testing .assert_frame_equal (mapping , pd .read_parquet (test_path ))
250
+ expected = pd .read_parquet (test_path )
251
+ pd .testing .assert_frame_equal (mapping , expected .assign (step = lambda x : x .step .astype ("timedelta64[ns]" )))
251
252
252
253
# parse the idx files for 20231104 and compare the mapped result to the direct indexed result
253
254
test_name = fnames ["20231104" ]
@@ -284,6 +285,8 @@ def test_build_idx_grib_mapping(self):
284
285
)
285
286
expected = pd .read_parquet (kindex_test_path )
286
287
288
+ expected = expected .assign (step = lambda x : x .step .astype ("timedelta64[ns]" ))
289
+
287
290
expected = expected .set_index (
288
291
["varname" , "typeOfLevel" , "stepType" , "step" , "level" ]
289
292
).sort_index ()
@@ -382,7 +385,8 @@ def test_kerchunk_indexing(self):
382
385
TEST_DATE ,
383
386
f"{ fname } .kindex.parquet" ,
384
387
)
385
- pd .testing .assert_frame_equal (kindex , pd .read_parquet (test_path ))
388
+ expected = pd .read_parquet (test_path )
389
+ pd .testing .assert_frame_equal (kindex , expected .assign (step = lambda x : x .step .astype ("timedelta64[ns]" )))
386
390
387
391
@unittest .skip ("TODO" )
388
392
def test_extract_dataset_chunk_index (self ):
@@ -428,7 +432,7 @@ def _test_index_extraction(self, sample_prefix: str):
428
432
THIS_DIR , "grib_idx_fixtures" , sample_prefix , "kerchunk_index.parquet"
429
433
)
430
434
expected = pd .read_parquet (test_path )
431
- pd .testing .assert_frame_equal (k_index , expected )
435
+ pd .testing .assert_frame_equal (k_index , expected . assign ( step = lambda x : x . step . astype ( "timedelta64[ns]" )) )
432
436
433
437
def test_strip_datavar_chunks (self ):
434
438
for sample_prefix , pre , post in [
0 commit comments