mirror of https://github.com/scrapy/scrapy.git
Forward coverage envvars needed to cover subprocess
This commit is contained in:
parent
43fc2f23b8
commit
27077d2b6c
|
|
@ -13,6 +13,14 @@ os.environ['http_proxy'] = ''
|
|||
os.environ['https_proxy'] = ''
|
||||
os.environ['ftp_proxy'] = ''
|
||||
|
||||
# Absolutize paths to coverage config and output file because tests that
|
||||
# spawn subprocesses also changes current working directory.
|
||||
_sourceroot = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
if 'COV_CORE_CONFIG' in os.environ:
|
||||
os.environ['COVERAGE_FILE'] = os.path.join(_sourceroot, '.coverage')
|
||||
os.environ['COV_CORE_CONFIG'] = os.path.join(_sourceroot,
|
||||
os.environ['COV_CORE_CONFIG'])
|
||||
|
||||
try:
|
||||
import unittest.mock as mock
|
||||
except ImportError:
|
||||
|
|
|
|||
Loading…
Reference in New Issue