#3557 closed defect (fixed)

Test suit prints GuessedAtParserWarning

Reported by: sajith Owned by: sajith
Priority: normal Milestone: undecided
Component: dev-infrastructure Version: n/a
Keywords: review-needed Cc:
Launchpad Bug:

Description

When running the test suite, BeautifulSoup prints these warnings:

.tox/py/lib/python2.7/site-packages/allmydata/test/test_checker.py:147:
GuessedAtParserWarning: No parser was explicitly specified, so
I'm using the best available HTML parser for this
system ("html5lib"). This usually isn't a problem, but if you run
this code on another system, or in a different virtual
environment, it may use a different parser and behave
differently.

The code that caused this warning is on line 147 of the file
.tox/py/lib/python2.7/site-packages/allmydata/test/test_checker.py. To
get rid of this warning, pass the additional argument
'features="html5lib"' to the BeautifulSoup constructor.
.tox/py/lib/python2.7/site-packages/allmydata/test/web/test_common.py:163:
GuessedAtParserWarning: No parser was explicitly specified, so
I'm using the best available HTML parser for this
system ("html5lib"). This usually isn't a problem, but if you run
this code on another system, or in a different virtual
environment, it may use a different parser and behave
differently.

The code that caused this warning is on line 163 of the file
.tox/py/lib/python2.7/site-packages/allmydata/test/web/test_common.py. To
get rid of this warning, pass the additional argument
'features="html5lib"' to the BeautifulSoup constructor.

See this, this, and this for examples from CI runs.

Change History (3)

comment:1 Changed at 2020-12-13T11:50:53Z by sajith

Affected tests:

  • allmydata.test.test_checker.WebResultsRendering.test_check
  • allmydata.test.test_checker.WebResultsRendering.test_check_and_repair
  • allmydata.test.web.test_common.RenderExceptionTests.test_decodedurl

comment:3 Changed at 2020-12-15T12:51:01Z by GitHub <noreply@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 7458ea63/trunk:

Merge pull request #926 from sajith/3557.GuessedAtParserWarning?

Fix BeautifulSoup?'s GuessedAtParserWarning?

Fixes: ticket:3557

Note: See TracTickets for help on using tickets.