diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2018-04-19 07:28:48 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2018-04-19 07:28:48 -0400 |
commit | 37b10a651fb8bbcee2a6a461ed6d4e4ba6b9ee4b (patch) | |
tree | f5e34034be8721088019022342313abe51ab83e7 /coverage/multiproc.py | |
parent | c5e3f3751d1ea54b8e75b0d589f8912c4aaa63c6 (diff) | |
download | python-coveragepy-git-37b10a651fb8bbcee2a6a461ed6d4e4ba6b9ee4b.tar.gz |
Now with COVERAGE_RCFILE, no need for multiprocessing to do its own env thing
Diffstat (limited to 'coverage/multiproc.py')
-rw-r--r-- | coverage/multiproc.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/coverage/multiproc.py b/coverage/multiproc.py index b0407651..93b31552 100644 --- a/coverage/multiproc.py +++ b/coverage/multiproc.py @@ -14,9 +14,6 @@ from coverage.misc import contract # monkey-patched. PATCHED_MARKER = "_coverage$patched" -# The environment variable that specifies the rcfile for subprocesses. -COVERAGE_RCFILE_ENV = "_COVERAGE_RCFILE" - if sys.version_info >= (3, 4): OriginalProcess = multiprocessing.process.BaseProcess @@ -31,8 +28,7 @@ class ProcessWithCoverage(OriginalProcess): def _bootstrap(self): """Wrapper around _bootstrap to start coverage.""" from coverage import Coverage # avoid circular import - rcfile = os.environ[COVERAGE_RCFILE_ENV] - cov = Coverage(data_suffix=True, config_file=rcfile) + cov = Coverage(data_suffix=True) cov._warn_preimported_source = False cov.start() debug = cov._debug @@ -81,7 +77,7 @@ def patch_multiprocessing(rcfile): # Set the value in ProcessWithCoverage that will be pickled into the child # process. - os.environ[COVERAGE_RCFILE_ENV] = rcfile + os.environ["COVERAGE_RCFILE"] = rcfile # When spawning processes rather than forking them, we have no state in the # new process. We sneak in there with a Stowaway: we stuff one of our own |