mirror of
https://github.com/django/django.git
synced 2024-12-22 09:05:43 +00:00
Fixed #34810 -- Measured test coverage on django-admin commands.
This commit is contained in:
parent
254df3a3bb
commit
1ab2cf7994
@ -1,7 +1,7 @@
|
||||
[run]
|
||||
branch = True
|
||||
concurrency = multiprocessing,thread
|
||||
data_file = .coverages/.coverage
|
||||
data_file = ${RUNTESTS_DIR-.}/.coverages/.coverage
|
||||
omit =
|
||||
*/django/utils/autoreload.py
|
||||
source = django
|
||||
|
@ -71,6 +71,10 @@ tempfile.tempdir = os.environ["TMPDIR"] = TMPDIR
|
||||
# Removing the temporary TMPDIR.
|
||||
atexit.register(shutil.rmtree, TMPDIR)
|
||||
|
||||
# Add variables enabling coverage to trace code in subprocesses.
|
||||
os.environ["RUNTESTS_DIR"] = RUNTESTS_DIR
|
||||
os.environ["COVERAGE_PROCESS_START"] = os.path.join(RUNTESTS_DIR, ".coveragerc")
|
||||
|
||||
|
||||
# This is a dict mapping RUNTESTS_DIR subdirectory to subdirectories of that
|
||||
# directory to skip when searching for test modules.
|
||||
|
6
tests/sitecustomize.py
Normal file
6
tests/sitecustomize.py
Normal file
@ -0,0 +1,6 @@
|
||||
try:
|
||||
import coverage
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
coverage.process_startup()
|
Loading…
Reference in New Issue
Block a user