Closed mdickinson closed 3 years ago
test_ignore_broken_distributions_loads_good_distributions
has a similar-looking issue. Converting to draft while I figure out whether I can fix that test too as part of this PR.
Second test fixed, and PR updated to use a cleaner fix for restoring sys.path
.
Never mind the approval. Didn't notice the CI failure.
Didn't notice the CI failure.
Sigh. Neither did I. Investigating.
Okay, looks like the problem is yet more dependence on global state. When I was testing, the acme.foo
egg sitting inside the repository had been built, so it had an acme.foo.egg-info
. After a git clean
and a re-install, I can reproduce the failures locally.
Fix a test that was only passing as a result of side-effects from other tests in the same
TestCase
.The test was passing when run as part of the complete test case because a distribution of
acme.foo
with version0.1a1
was already in the global working set. This PR changes the test to explicitly addacme.foo
to the global working set, so that the test passes both standalone and as part of the whole test case.(Note that the global working set is reset at
tearDown
time, though I plan another PR to clean up the test side-effects.)Closes #441