-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trace module cli does not write cover files #76089
Comments
The trace module command-line utility doesn't write cover files. I've noticed this issue for some years now. It works fine in Python 2. When using Python 3, no ".cover" files are written, regardless of how "--coverdir" is specified.
My apologies if this is a duplicate bug. I searched the tracker and Google for a while, but couldn't find a relevant issue. |
It worked in Python 3.4, but not afterwards. |
The problem appears to be a mistake in commit f026dae This made the writing of cover files conditional on https://github.com/python/cpython/blob/3.5/Lib/trace.py#L326
|
While writing a patch for this, I noticed the https://github.com/python/cpython/blob/master/Lib/trace.py#L333 Further, the choice to count unreached lines only when https://github.com/python/cpython/blob/master/Lib/trace.py#L335 https://github.com/python/cpython/blob/master/Lib/trace.py#L280 |
Ok, pull request submitted: |
I think the first part of your patch also fixes bpo-26818. Could you adapt the test there and add a test case for the problem in this issue? |
You're referring to something like this: + def test_count_and_summary(self): ? |
This change causes test_trace to leave a trace.cover file in the Lib directory (see bpo-34171). |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: