-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
Tests that depend on external things (PyPI, github, bitbucket, launchpad) are brittle and prone to failure. Our current caching strategy for those external dependencies helps with the speed problem (some; not as much as one would hope), but makes the fragility even worse - it introduces an extra layer of complexity and of things that might change from one test run to the next (i.e. some broken test corrupting the cache causes the next cached run to fail). These are all real problems that wasted my time during the Py3k porting work.
I want to convert all of pip's tests to be all self-contained all the time and fully repeatable - no external dependencies. That means our tests create any repositories that they need locally as part of test setup, and we use hg serve, bzr serve, git-web etc if needed to simulate fetching across the network. Similarly for PyPI.
We could leave in place a test script that does some actual tests with remote repos and PyPI, that wouldn't be run as part of the normal test suite or by CI, but could be used as a real-world sanity check.