-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Rewrite flaky test_vcs_url_urlquote_normalization to use local git repo #13243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
pkg_path = _create_test_package( | ||
script.scratch_path, name="django_wikiapp", vcs="git" | ||
) | ||
url = f"git+{pkg_path.as_uri().replace('django_', 'django%5F')}/#egg=django_wikiapp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The _create_test_package
helper is pretty rudimentary and will produce a package with broken entry-points if I use a dash (causing setuptools to loudly complain during package building), thus I had to switch it out for an underscore. Same idea, but different character.
tests/functional/test_install.py
Outdated
@@ -520,25 +520,15 @@ def test_install_editable_from_bazaar(script: PipTestEnvironment) -> None: | |||
|
|||
|
|||
@pytest.mark.network |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is network access still necessary with a local installation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally installing from source requires internet access to download setuptools, but it turns out the legacy editable install mechanism is being used, thus, pip will use the already provisioned setuptools to build.
This may/will probably break once we remove the legacy editable mechanism, but honestly, I'd like to overhaul pip's end-to-end tests to avoid the network/prefer the local cache as much as possible anyway.
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.
2686d82
to
6c5e924
Compare
Ugh, setuptools 75.8.1 now emits wheels with normalized filenames. It was released 6 hours, and now ~30 tests are broken 🙃 |
…po (pypa#13243) 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.
Guess who got fed up enough 🙃
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.
Closes #13153.