def test_html_untyped(self): with tmpfile(".html") as path: df = UntypedDf(sample_data()) df.to_html(path) df2 = UntypedDf.read_html(path) assert list(df2.index.names) == [None] assert set(df2.columns) == {"abc", "123", "xyz"}
def test_html_empty(self): with tmpfile(".html") as path: path.write_text("<html></html>", encoding="utf8") with pytest.raises(NoValueError): UntypedDf.read_html(path)
def test_html_invalid(self): with tmpfile(".html") as path: path.write_text("", encoding="utf8") with pytest.raises(XMLSyntaxError): UntypedDf.read_html(path)