Scrapy, a fast high-level web crawling & scraping framework for Python.
Forward coverage envvars needed to cover subprocess
Daniel Graña27077d2b6cb3
diff --git a/tests/__init__.py b/tests/__init__.pyindex d017afad4..d940f28ea 100644--- a/tests/__init__.py+++ b/tests/__init__.py@@ -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 mockexcept ImportError: