From 955c7e0169c543976e247725ad6c004eaccef8b5 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Thu, 20 Feb 2025 18:31:57 -0500 Subject: [PATCH] tests: fix failure due to a slight difference in HF exception message The observed message in CI run is: `401 Client Error: Unauthorized for url: ...` (note the `:` character instead of a dot) Note: in general it's a bad idea to assume a particular message is returned, but leaving dealing with improving the test case for when CI is fixed. Signed-off-by: Ihar Hrachyshka (cherry picked from commit 3b33997975a2fdcbb0c266fd5449b8fe8c8c4537) --- tests/test_lab_upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_lab_upload.py b/tests/test_lab_upload.py index 7cee48b024..09314ad517 100644 --- a/tests/test_lab_upload.py +++ b/tests/test_lab_upload.py @@ -189,7 +189,7 @@ def test_upload_bad_dest_hf(self, tmp_path: pathlib.Path, cli_runner: CliRunner) result.exit_code == 1 ), f"command finished with an unexpected exit code. {result.stdout}" assert ( - f"Uploading GGUF model at {tmp_gguf} failed with the following Hugging Face Hub error:\n401 Client Error." + f"Uploading GGUF model at {tmp_gguf} failed with the following Hugging Face Hub error:\n401 Client Error" ) in result.output @patch("instructlab.utils.check_skopeo_version")