summaryrefslogtreecommitdiff
path: root/coverage/debug.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2018-10-14 20:39:46 -0400
committerNed Batchelder <ned@nedbatchelder.com>2018-10-14 20:59:57 -0400
commitae9f040dc4189d73fdd708aa4ba61bf50d7b2a25 (patch)
treeee36612ab56483fbbcae6fc60c4f2812ef9014a5 /coverage/debug.py
parent4a404ce724280bf9c5f4bcf1e6a5ba76d7499d89 (diff)
downloadpython-coveragepy-git-ae9f040dc4189d73fdd708aa4ba61bf50d7b2a25.tar.gz
Defer using the database when calling set_context #716
The collector calls set_context() before any code is run. If we touch the database there, it will get created *very* early. This causes problems with pytest-cov, which will delete those early-created files when erasing data. By deferring the database access until add_lines is called, the data file stays off the disk until the collection is done (or until the context switches), which avoids the problem.
Diffstat (limited to 'coverage/debug.py')
0 files changed, 0 insertions, 0 deletions