This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Add pid to .cover filename in lib/trace.py
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.8, Python 3.7, Python 3.6, Python 3.4, Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: nedbat, nikhilh
Priority: normal Keywords:

Created on 2017-11-28 08:45 by nikhilh, last changed 2022-04-11 14:58 by admin.

Files
File name Uploaded Description Edit
trace_generic.py nikhilh, 2017-11-28 08:51
Messages (5)
msg307110 - (view) Author: Nikhil Hegde (nikhilh) * Date: 2017-11-28 08:45
Adding pid to filenames will avoid file write error when multiple processes (specifically, multiple tests) are writing to the same .cover file
msg307112 - (view) Author: Nikhil Hegde (nikhilh) * Date: 2017-11-28 08:51
In the trace_generic.py file that I've attached, the changes are on line 331
msg307388 - (view) Author: Nikhil Hegde (nikhilh) * Date: 2017-12-01 14:21
This is also necessary in a case where two tests (say, a and b) are running in parallel. Both tests access the same fileX.py
The coverage for fileX.py will not be accurate to reflect the usage by
tests a and b
msg308499 - (view) Author: Nikhil Hegde (nikhilh) * Date: 2017-12-17 20:29
Any ETA I can get on this?
msg325483 - (view) Author: Ned Batchelder (nedbat) * (Python triager) Date: 2018-09-16 13:13
The trace module doesn't get much use.  Have you tried using coverage.py?  https://pypi.org/project/coverage/
History
Date User Action Args
2022-04-11 14:58:54adminsetgithub: 76333
2018-09-16 13:13:55nedbatsetnosy: + nedbat
messages: + msg325483
2017-12-17 20:29:06nikhilhsetmessages: + msg308499
2017-12-01 14:21:59nikhilhsetmessages: + msg307388
versions: + Python 3.5, Python 3.6, Python 3.7, Python 3.8
2017-11-28 08:51:37nikhilhsetfiles: + trace_generic.py

messages: + msg307112
2017-11-28 08:45:04nikhilhcreate