-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Fix TypeError in report_collect with _collect_report_last_write #4330
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
Conversation
Thanks @blueyed, you are on 🔥
Oh just saw the issue, and I can replicate using the command posted there. But I worry that this was passing before, because we might introduce a regression by mistake in the future. |
When doing this initially I assumed that both hooks were called in sequence always, which apparently is not the case here. |
Fair enough. 👍 |
Fails with: > OSError: reading from stdin while output is captured Also tests pytest-dev#4330 (i.e. fails without pytest-dev#4330 earlier already).
#4331 contains a test for this, but fails due to the capture plugin. |
`_collect_report_last_write` might be None, when `pytest_collection` was not called before. Not sure if this indicates another problem, but it can be reproduced with `testing/test_collection.py::TestCollector::()::test_getcustomfile_roundtrip`. Fixes pytest-dev#4329
Fails with: > OSError: reading from stdin while output is captured Also tests pytest-dev#4330 (i.e. fails without pytest-dev#4330 earlier already).
Included in #4331. |
5470533
to
91404db
Compare
Codecov Report
@@ Coverage Diff @@
## master #4330 +/- ##
==========================================
- Coverage 95.84% 93.72% -2.13%
==========================================
Files 111 111
Lines 24880 24875 -5
Branches 2430 2427 -3
==========================================
- Hits 23847 23314 -533
- Misses 736 1230 +494
- Partials 297 331 +34
Continue to review full report at Codecov.
|
Going to merge this already, since #4331 (which implicitly tests this) might take longer. |
Fails with: > OSError: reading from stdin while output is captured Also tests pytest-dev#4330 (i.e. fails without pytest-dev#4330 earlier already).
Fails with: > OSError: reading from stdin while output is captured Also tests pytest-dev#4330 (i.e. fails without pytest-dev#4330 earlier already).
Fails with: > OSError: reading from stdin while output is captured Also tests pytest-dev#4330 (i.e. fails without pytest-dev#4330 earlier already).
Fails with: > OSError: reading from stdin while output is captured Also tests pytest-dev#4330 (i.e. fails without pytest-dev#4330 earlier already).
_collect_report_last_write
might be None, whenpytest_collection
wasnot called before. Not sure if this indicates another problem, but it
can be reproduced with
testing/test_collection.py::TestCollector::()::test_getcustomfile_roundtrip
.Fixes #4329