Fix TypeError in report_collect with _collect_report_last_write#4330
Fix TypeError in report_collect with _collect_report_last_write#4330blueyed merged 1 commit intopytest-dev:masterfrom
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_writemight be None, whenpytest_collectionwasnot 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