def test_load_error(): import warnings warnings.filterwarnings("error") df = pd.DataFrame({ "a": [1, 2, 3, 1, 1, 1], "b": [1, 2, 3, 4, 5, 6], "c": [1, 2, 3, 4, 5, 6] }) profile1 = ProfileReport(df, minimal=True) data = profile1.dumps() # config not match but ignore_config ProfileReport.clear_config() ProfileReport(df, minimal=False).loads(data, ignore_config=True) # df not match with pytest.raises(ValueError) as e: ProfileReport.clear_config() ProfileReport(df=df[["a", "b"]][:], minimal=True).loads(data, ignore_config=True) assert str( e.value) == "DataFrame does not match with the current ProfileReport."