def test_normal_serialisation_dicts(input_): serialised = data_dumps(input_) assert isinstance(serialised, str) deserialised = data_loads(serialised) assert input_ == deserialised or np.isnan(input_)
def test_none_ok(): assert data_dumps(None) is None assert data_loads(None) is None
def test_pandas_df_serialisation(input_): serialised = data_dumps(input_) assert isinstance(serialised, str) deserialised = data_loads(serialised) assert isinstance(deserialised, type(input_)) assert pytest.helpers.exact_element_match(input_, deserialised)