We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b85c7d commit 3accd12Copy full SHA for 3accd12
pandas/tests/io/xml/test_xml.py
@@ -782,6 +782,19 @@ def test_read_xml_passing_as_positional_deprecated(datapath):
782
)
783
784
785
+@td.skip_if_no("lxml")
786
+def test_wrong_encoding_for_lxml():
787
+ # GH#45133
788
+ data = """<data>
789
+ <row>
790
+ <a>c</a>
791
+ </row>
792
+</data>
793
+"""
794
+ with pytest.raises(TypeError, match="encoding None"):
795
+ read_xml(StringIO(data), parser="lxml", encoding=None)
796
+
797
798
@td.skip_if_no("lxml")
799
def test_stylesheet_file_like(datapath, mode):
800
kml = datapath("io", "data", "xml", "cta_rail_lines.kml")
0 commit comments