From 0896a5b52f0a6ebe6614960d37c3f0f6227b00f2 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 12 Sep 2024 12:25:28 +0800 Subject: [PATCH 1/3] Correct usage of invalid file URL in test. --- tests/functional/test_bad_url.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/test_bad_url.py b/tests/functional/test_bad_url.py index bc3a987e6f2..b1938789867 100644 --- a/tests/functional/test_bad_url.py +++ b/tests/functional/test_bad_url.py @@ -8,7 +8,7 @@ def test_filenotfound_error_message(script: Any) -> None: # Test the error message returned when using a bad 'file:' URL. # make pip to fail and get an error message # by running "pip install -r file:nonexistent_file" - proc = script.pip("install", "-r", "file:unexistent_file", expect_error=True) + proc = script.pip("install", "-r", "file:///unexistent_file", expect_error=True) assert proc.returncode == 1 expect = ( "ERROR: 404 Client Error: FileNotFoundError for url: file:///unexistent_file" From 490364572caa16281d6f5012cd56cb607b363198 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 12 Sep 2024 12:35:21 +0800 Subject: [PATCH 2/3] Add changenote. --- news/12964.trivial.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/12964.trivial.rst diff --git a/news/12964.trivial.rst b/news/12964.trivial.rst new file mode 100644 index 00000000000..1467743ff13 --- /dev/null +++ b/news/12964.trivial.rst @@ -0,0 +1 @@ +A valid, but non-existent URL used in a test case was corrected to be a valid URL. From 5eaccb83008da9b2e0999642d4841b7816475394 Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung Date: Fri, 13 Sep 2024 01:47:29 +0800 Subject: [PATCH 3/3] Also change the comment --- tests/functional/test_bad_url.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/test_bad_url.py b/tests/functional/test_bad_url.py index b1938789867..7f6117e763b 100644 --- a/tests/functional/test_bad_url.py +++ b/tests/functional/test_bad_url.py @@ -7,7 +7,7 @@ def test_filenotfound_error_message(script: Any) -> None: # Test the error message returned when using a bad 'file:' URL. # make pip to fail and get an error message - # by running "pip install -r file:nonexistent_file" + # by running "pip install -r file:///nonexistent_file" proc = script.pip("install", "-r", "file:///unexistent_file", expect_error=True) assert proc.returncode == 1 expect = (