From 33d7d65da19389c489cc8f1ed91d83fe72a7508c Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Tue, 15 Oct 2019 23:21:45 +0530 Subject: [PATCH] Update test to verify that full URL is not printed --- tests/functional/test_install.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/functional/test_install.py b/tests/functional/test_install.py index f8f814a092d..823b2c1a1e9 100644 --- a/tests/functional/test_install.py +++ b/tests/functional/test_install.py @@ -226,7 +226,7 @@ def test_basic_install_from_pypi(script): """ Test installing a package from PyPI. """ - result = script.pip('install', '-vvv', 'INITools==0.2') + result = script.pip('install', 'INITools==0.2') egg_info_folder = ( script.site_packages / 'INITools-0.2-py%s.egg-info' % pyversion ) @@ -238,6 +238,13 @@ def test_basic_install_from_pypi(script): assert "Looking in indexes: " not in result.stdout assert "Looking in links: " not in result.stdout + # Ensure that we don't print the full URL. + # The URL should be trimmed to only the last part of the path in it, + # when installing from PyPI. The assertion here only checks for + # `https://` since that's likely to show up if we're not trimming in + # the correct circumstances. + assert "https://" not in result.stdout + def test_basic_editable_install(script): """