测试: 易出错的 HLS 测试,日志记录会渗入后续测试
================================== FAILURES =================================== _________ TestPlayerOutput.test_player_close[Acceptable error: EPIPE] _________
- Exception Group Traceback (most recent call last): | File "C:\hostedtoolcache\windows\Python\3.13.12\x64\Lib\site-packages\trio_core_run.py", line 1126, in aexit | raise combined_error_from_nursery
| ExceptionGroup: Exceptions from Trio nursery (1 sub-exception)
- -+---------------- 1 ---------------- | Traceback (most recent call last): | File "C:\hostedtoolcache\windows\Python\3.13.12\x64\Lib\site-packages\pytest_trio\plugin.py", line 195, in _fixture_manager | yield nursery_fixture
| File "C:\hostedtoolcache\windows\Python\3.13.12\x64\Lib\site-packages\pytest_trio\plugin.py", line 250, in run | await self._func(**resolved_kwargs) | File "D:\a\streamlink\streamlink\tests\cli\test_streamrunner.py", line 354, in test_player_close | assert [(record.module, record.levelname, record.message) for record in caplog.records] == [ | ...<2 lines>... | ] | AssertionError: assert [('segmented', 'debug', 'Closing worker thread')] == [('streamrunner', 'info', 'Player closed')] | At index 0 diff: ('segmented', 'debug', 'Closing worker thread') != ('streamrunner', 'info', 'Player closed') | Left contains 2 more items, first extra item: ('streamrunner', 'info', 'Player closed') | | Full diff: | [ | + ( | + 'segmented', | + 'debug', | + 'Closing worker thread', | + ), | + ( | + 'segmented', | + 'debug', | + 'Closing writer thread', | + ), | + ( | + 'streamrunner', | + 'info', | + 'Player closed', | + ), | + ( | + 'streamrunner', | + 'info', | + 'Stream ended', | + ), | + ] +------------------------------------ ----------------------------- Captured
内容来源: streamlink/streamlink