Allow running tests against the installed version #5949
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #4914 by using get_testenv() only for
python3 -m scrapy.cmdline
and finding files undertests
via different mechanisms.For some reason running these as-installed tests in the Debian autopkgtest chroot always fails on
tests/test_crawl.py::CrawlTestCase::test_start_requests_laziness
with "All start requests consumed before any download happened". I've looked at the test and the spider it runs and I don't understand if it just relies on mockserver replying faster than start_requests schedules requests or there is something more stable. When I extracted this spider and ran it viascrapy crawlspider
on a separately started mockserver it also often (but not always) fails with the same problem. It's possible that the test is just flaky and depends on performance of various components, but I don't remember if it fails on some CI runs.