Skip to content

Commit 43eb7f6

Browse files
committed
fix Windows path escaping issue in regex match
1 parent efdbe28 commit 43eb7f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_serialization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ def test_load_torch_model_directory_does_not_exist():
667667

668668
def test_load_torch_model_directory_does_not_contain_checkpoint(tmp_path):
669669
"""Test proper error handling when directory does not contain a valid checkpoint."""
670-
with pytest.raises(ValueError, match=f"Directory '{tmp_path}' does not contain a valid checkpoint."):
670+
with pytest.raises(ValueError, match=r"Directory .* does not contain a valid checkpoint."):
671671
load_torch_model(Mock(), tmp_path)
672672

673673

0 commit comments

Comments
 (0)