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 efdbe28 commit 43eb7f6Copy full SHA for 43eb7f6
tests/test_serialization.py
@@ -667,7 +667,7 @@ def test_load_torch_model_directory_does_not_exist():
667
668
def test_load_torch_model_directory_does_not_contain_checkpoint(tmp_path):
669
"""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."):
+ with pytest.raises(ValueError, match=r"Directory .* does not contain a valid checkpoint."):
671
load_torch_model(Mock(), tmp_path)
672
673
0 commit comments