Skip to content

Commit 2686d82

Browse files
committed
Rewrite flaky test_vcs_url_urlquote_normalization to use local git repo
Looking at the VCS code, I'm not actually sure if the original test is testing what's supposed to be testing nowadays. The docstring suggests it's testing the compare_urls() method in vcs/versioncontrol.py but it never called in the original test. Anyway, this test has been particularly flaky as Launchpad frequently timeouts. We don't need to test bzr here, so let's switch to test against a local git repository.
1 parent ae1b526 commit 2686d82

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

tests/functional/test_install.py

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -520,25 +520,15 @@ def test_install_editable_from_bazaar(script: PipTestEnvironment) -> None:
520520

521521

522522
@pytest.mark.network
523-
@need_bzr
524-
def test_vcs_url_urlquote_normalization(
525-
script: PipTestEnvironment, tmpdir: Path
526-
) -> None:
523+
def test_vcs_url_urlquote_normalization(script: PipTestEnvironment) -> None:
527524
"""
528525
Test that urlquoted characters are normalized for repo URL comparison.
529526
"""
530-
script.pip(
531-
"install",
532-
"-e",
533-
"{url}/#egg=django-wikiapp".format(
534-
url=local_checkout(
535-
"bzr+http://bazaar.launchpad.net/"
536-
"%7Edjango-wikiapp/django-wikiapp"
537-
"/release-0.1",
538-
tmpdir,
539-
)
540-
),
527+
pkg_path = _create_test_package(
528+
script.scratch_path, name="django_wikiapp", vcs="git"
541529
)
530+
url = f"git+{pkg_path.as_uri().replace('django_', 'django%5F')}/#egg=django_wikiapp"
531+
script.pip("install", "-e", url)
542532

543533

544534
@pytest.mark.parametrize("resolver", ["", "--use-deprecated=legacy-resolver"])

0 commit comments

Comments
 (0)