MagicStack / MagicStack/httptools

TestResponseParser.test_parser_response_leninent_headers_1 test failure

未關閉
#119 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
Python
星號
1.3k
分支
107
PR 合併指標
30 天內沒有已合併 PR

描述

Hello,

Builing httptools 0.6.4, I see:

```
=================================== FAILURES ===================================
__________ TestResponseParser.test_parser_response_leninent_headers_1 __________
Traceback (most recent call last):
File "/gnu/store/jjcka1g6sk2cvwx8nm4fdwpdq3vll0v0-python-3.10.7/lib/python3.10/unittest/case.py", line 59, in testPartExecutor
yield
File "/gnu/store/jjcka1g6sk2cvwx8nm4fdwpdq3vll0v0-python-3.10.7/lib/python3.10/unittest/case.py", line 591, in run
self._callTestMethod(testMethod)
File "/gnu/store/jjcka1g6sk2cvwx8nm4fdwpdq3vll0v0-python-3.10.7/lib/python3.10/unittest/case.py", line 549, in _callTestMethod
method()
File "/tmp/guix-build-python-httptools-0.6.4.drv-0/source/tests/test_parser.py", line 132, in test_parser_response_leninent_headers_1
with self.assertRaisesRegex(
File "/gnu/store/jjcka1g6sk2cvwx8nm4fdwpdq3vll0v0-python-3.10.7/lib/python3.10/unittest/case.py", line 226, in __exit__
self._raiseFailure("{} not raised".format(exc_name))
File "/gnu/store/jjcka1g6sk2cvwx8nm4fdwpdq3vll0v0-python-3.10.7/lib/python3.10/unittest/case.py", line 163, in _raiseFailure
raise self.test_case.failureException(msg)
AssertionError: HttpParserError not raised
=========================== short test summary info ============================
FAILED tests/test_parser.py::TestResponseParser::test_parser_response_leninent_headers_1 - AssertionError: HttpParserError not raised
========================= 1 failed, 39 passed in 0.08s =========================
```

This happens using the systemt-provided llhttp and http-parser libraries. Python is at 3.10.7, while the direct inputs are:
```
dependencies: http-parser@2.9.4-1.ec8b5ee llhttp@9.1.3 python-cython@0.29.32 python-pytest@8.3.3
```

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 tests/test_parser.py 開始,並使用回報的 Python、http-parser 和 llhttp 版本執行 TestResponseParser.test_parser_response_leninent_headers_1。追查為什麼使用系統提供的函式庫時不會引發 HttpParserError;完成的標準是測試行為已獲解決,或明確說明相容性預期。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
backend-api-design, testing-qa
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
30/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。