Skip to content

Commit ca0e751

Browse files
committed
Fix Windows path regex error
1 parent de81cb9 commit ca0e751

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pandas/tests/io/xml/test_to_xml.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
StringIO,
66
)
77
import os
8-
from pathlib import Path
98

109
import numpy as np
1110
import pytest
@@ -204,11 +203,10 @@ def test_str_output(datapath, parser):
204203

205204
def test_wrong_file_path(parser):
206205
path = "/my/fake/path/output.xml"
207-
parent = Path(path).parent
208206

209207
with pytest.raises(
210208
OSError,
211-
match=(fr"Cannot save file into a non-existent directory: '{parent}'"),
209+
match=(r"Cannot save file into a non-existent directory: .*path"),
212210
):
213211
geom_df.to_xml(path, parser=parser)
214212

0 commit comments

Comments
 (0)