Skip to content

Commit 065e13f

Browse files
jezdezionelmc
authored andcommitted
Get data_file path from Coverage config in subprocesses.
Fix #145.
1 parent 008447b commit 065e13f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: src/pytest_cov/engine.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ def set_env(self):
4040
os.environ['COV_CORE_CONFIG'] = config_file
4141
else:
4242
os.environ['COV_CORE_CONFIG'] = ''
43-
os.environ['COV_CORE_DATAFILE'] = os.path.abspath('.coverage')
43+
data_file = os.path.abspath('.coverage')
44+
os.environ['COV_CORE_DATAFILE'] = getattr(self.config, 'data_file', data_file)
4445
if self.cov_branch:
4546
os.environ['COV_CORE_BRANCH'] = 'enabled'
4647

0 commit comments

Comments
 (0)