test(runner): Use checked out source for local tests

TL;DR: Capture how to use real source file paths for local development.

It can be useful to run the tests against the currently checked out Python source files.
Changes are reflected immediately.  Source file paths in Tracebacks (and other things
that print the file path for Python modules) are to the actual checked out source and
can be copied and pasted or used by tools that expect real paths.

OTOH, testing against a real Python package install into a virtualenv done from a real
source distribution can expose rare but very confusing issues.

So doing both is valuable.  Most typically, the former is useful for local development
and the latter is most appropriate in CI.
This commit is contained in:
Ross Patterson 2020-09-24 11:11:01 -07:00
parent 1593ff5c52
commit 92de966c91

View File

@ -30,7 +30,7 @@ default:
.PHONY: test
## Run all tests and code reports
test: .tox
tox -p auto
tox --develop -p auto
# This is necessary only if you want to automatically produce a new
# _version.py file from the current git history (without doing a build).