From a4908da04ef50cb286d8f203c629c69e49f03423 Mon Sep 17 00:00:00 2001 From: Yih-Dar <2521628+ydshieh@users.noreply.github.com> Date: Thu, 27 Apr 2023 14:22:05 +0200 Subject: [PATCH] Fix the expected error in `test_offline_mode_pipeline_exception` (#23022) * fix --------- Co-authored-by: ydshieh --- tests/utils/test_offline.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/utils/test_offline.py b/tests/utils/test_offline.py index ad59747386..ecc7938bf3 100644 --- a/tests/utils/test_offline.py +++ b/tests/utils/test_offline.py @@ -175,7 +175,8 @@ socket.socket = offline_socket result = subprocess.run(cmd, env=env, check=False, capture_output=True) self.assertEqual(result.returncode, 1, result.stderr) self.assertIn( - "You cannot infer task automatically within `pipeline` when using offline mode", result.stderr.decode() + "You cannot infer task automatically within `pipeline` when using offline mode", + result.stderr.decode().replace("\n", ""), ) @require_torch