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
[4.6] tests: restore tracing function #5408
[4.6] tests: restore tracing function #5408
Conversation
Without this, `testing/test_pdb.py` (already without pexpect) will cause missing test coverage afterwards (for the same process).
Codecov Report
@@ Coverage Diff @@
## 4.6-maintenance #5408 +/- ##
===================================================
+ Coverage 94.43% 96.18% +1.74%
===================================================
Files 115 115
Lines 26384 26391 +7
Branches 2603 2605 +2
===================================================
+ Hits 24916 25383 +467
+ Misses 1143 703 -440
+ Partials 325 305 -20
Continue to review full report at Codecov.
|
import pytest | ||
|
||
if sys.gettrace(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm I would have put this in the function and orig_trace is not None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, this way it avoids using the fixture when not run with coverage (i.e. no initial tracing).
(not sure I understand your suggestion though)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree it seems better to not have this active without need.
import pytest | ||
|
||
if sys.gettrace(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree it seems better to not have this active without need.
I will go ahead and merge this as the original PR is already on master. 👍 |
Thanks. We can still improve/change it though (possibly without a backport), if @asottile would like to have it. |
Definitely! I just went ahead with the merge because IMO we should try to make the backports as close to the original as possible. Improvements suggested during the backport PR should happen in another round of PRs if they apply to the original patch. |
Without this,
testing/test_pdb.py
(already without pexpect) will causemissing test coverage afterwards (for the same process).