MCPcopy
hub / github.com/pandas-dev/pandas / test_pickle_fsspec_roundtrip

Function test_pickle_fsspec_roundtrip

pandas/tests/io/test_pickle.py:448–459  ·  view source on GitHub ↗
(temp_file)

Source from the content-addressed store, hash-verified

446
447
448def test_pickle_fsspec_roundtrip(temp_file):
449 pytest.importorskip("fsspec")
450 # Using temp_file for context, but fsspec uses memory URL
451 mockurl = "memory://mockfile"
452 df = DataFrame(
453 1.1 * np.arange(120).reshape((30, 4)),
454 columns=Index(list("ABCD"), dtype=object),
455 index=Index([f"i-{i}" for i in range(30)], dtype=object),
456 )
457 df.to_pickle(mockurl)
458 result = pd.read_pickle(mockurl)
459 tm.assert_frame_equal(df, result)
460
461
462class MyTz(datetime.tzinfo):

Callers

nothing calls this directly

Calls 4

DataFrameClass · 0.90
IndexClass · 0.90
to_pickleMethod · 0.80
reshapeMethod · 0.45

Tested by

no test coverage detected