github_repo_scraped / repos /cloudpipe-cloudpickle-227f246 /ci /install_coverage_subprocess_pth.py
Asib27's picture
try 1
065fee7 verified
raw
history blame
484 Bytes
# Make it possible to enable test coverage reporting for Python
# code run in children processes.
# http://coverage.readthedocs.io/en/latest/subprocess.html
import os.path as op
from sysconfig import get_path
FILE_CONTENT = """\
import coverage; coverage.process_startup()
"""
filename = op.join(get_path('purelib'), 'coverage_subprocess.pth')
with open(filename, 'wb') as f:
f.write(FILE_CONTENT.encode('ascii'))
print('Installed subprocess coverage support: %s' % filename)