test: make the 429 red line actually catch its violation
Verifier mutation test: flipping _translate_429 to parse the summary left all 824 tests green. The padding was one long string value, so the cut landed inside it - and head-and-tail retention kept the trailing error object, leaving the summary parseable. Many keys put the cut between structural tokens, where the summary stops being valid JSON. Mutation now fails as it should. Also splits OCR 429 out on its own.
This commit is contained in:
@@ -312,7 +312,12 @@ class TestErrorTranslation:
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("status", "exc_type"),
|
||||
[(502, TransientError), (401, SourceDeadError), (404, RequestRejectedError)],
|
||||
[
|
||||
(502, TransientError),
|
||||
(429, TransientError), # 与 5xx 共用分支,但仍单列: 漏分支正是 issue #10 的成因
|
||||
(401, SourceDeadError),
|
||||
(404, RequestRejectedError),
|
||||
],
|
||||
)
|
||||
async def test_body_survives_every_branch(self, status, exc_type):
|
||||
"""issue #10: OCR 侧 message 原本只有 HTTP 状态码,拒绝理由同样丢失。"""
|
||||
|
||||
Reference in New Issue
Block a user