Skip to content

Commit 0cfa522

Browse files
committed
Fix regex error in Windows
1 parent 6f4a9a5 commit 0cfa522

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pandas/tests/io/test_common.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,10 @@ def test_write_missing_parent_directory(self, method, module, error_class, fn_ex
247247
dummy_frame = pd.DataFrame({"a": [1, 2, 3], "b": [2, 3, 4], "c": [3, 4, 5]})
248248

249249
path = os.path.join(HERE, "data", "missing_folder", "does_not_exist." + fn_ext)
250-
dirname = os.path.dirname(path)
251250

252251
with pytest.raises(
253252
error_class,
254-
match=fr"Cannot save file into a non-existent directory: '{dirname}'",
253+
match=r"Cannot save file into a non-existent directory: .*missing_folder",
255254
):
256255
method(dummy_frame, path)
257256

0 commit comments

Comments
 (0)