这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@inetol
Copy link
Member

@inetol inetol commented Jun 27, 2025

Make sure to prase everything before returning.

Related: \

FAIL: test_html_to_text (tests.unit.test_utils.TestUtils.test_html_to_text)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/searxng/searxng/tests/unit/test_utils.py", line 53, in test_html_to_text
    self.assertEqual(utils.html_to_text(r"regexp: (?<![a-zA-Z]"), "regexp: (?<![a-zA-Z]")
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'regexp: (?' != 'regexp: (?<![a-zA-Z]'
- regexp: (?
+ regexp: (?<![a-zA-Z]

An example of failing CI until logs expire https://github.com/searxng/searxng/actions/runs/15920488397/job/44927329750

Make sure to prase everything before returning.

Related: \
```
FAIL: test_html_to_text (tests.unit.test_utils.TestUtils.test_html_to_text)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/searxng/searxng/tests/unit/test_utils.py", line 53, in test_html_to_text
    self.assertEqual(utils.html_to_text(r"regexp: (?<![a-zA-Z]"), "regexp: (?<![a-zA-Z]")
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'regexp: (?' != 'regexp: (?<![a-zA-Z]'
- regexp: (?
+ regexp: (?<![a-zA-Z]
```
@inetol inetol requested review from Bnyro and return42 June 27, 2025 14:53
Copy link
Member

@Bnyro Bnyro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for looking into this so quickly!

I've had the same CI failure on a recent PR, and the HTMLParser docs state that "data is buffered until more data is fed or close() is called", so it makes a lot of sense to always close the buffer to prevent such issues.

@inetol inetol merged commit 49fdf4e into searxng:master Jun 27, 2025
7 checks passed
@inetol inetol deleted the utils-truncated-result branch June 27, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants