MCPcopy Create free account
hub / github.com/dot-agent/nextpy / test_serialize_dataframe

Function test_serialize_dataframe

tests/components/datadisplay/test_datatable.py:112–120  ·  view source on GitHub ↗

Test if dataframe is serialized correctly.

()

Source from the content-addressed store, hash-verified

110
111
112def test_serialize_dataframe():
113 """Test if dataframe is serialized correctly."""
114 df = pd.DataFrame(
115 [["foo", "bar"], ["foo1", "bar1"]], columns=["column1", "column2"]
116 )
117 value = serialize(df)
118 assert value == serialize_dataframe(df)
119 assert isinstance(value, dict)
120 assert list(value.keys()) == ["columns", "data"]

Callers

nothing calls this directly

Calls 3

serializeFunction · 0.90
serialize_dataframeFunction · 0.90
keysMethod · 0.45

Tested by

no test coverage detected