Skip to content

Commit

Permalink
test speedup: always use lxml (if html5lib is selected, some tests fail)
Browse files Browse the repository at this point in the history
  • Loading branch information
brondsem committed Oct 29, 2024
1 parent 008e465 commit 77c59e3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion AlluraTest/alluratest/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def setup_method(self, method=None):
pkg = self.__module__.split('.')[0]
self.app = ValidatingTestApp( # inherits from webtest.TestApp ultimately
setup_functional_test(app_name=self.application_under_test, current_pkg=pkg),
parser_features=BeautifulSoup.DEFAULT_BUILDER_FEATURES, # fastest parser (WebTest defaults to html.parser)
parser_features='lxml', # fastest parser (WebTest defaults to html.parser)
)
self.app.extra_environ = {'REMOTE_ADDR': '127.0.0.1'} # remote_addr needed by AntiSpam
if self.validate_skip:
Expand Down
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# development-only dependencies
# nothing needed at runtime or for tests

lxml # faster resp.html parsing in tests
pip-tools
q
sphinx-argparse
Expand Down
2 changes: 2 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ FormEncode
GitPython
html5lib
Jinja2
# for faster resp.html parsing in tests
lxml
Markdown
markdown-checklist
MarkupSafe
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ jmespath==1.0.1
# botocore
joserfc==0.9.0
# via beaker-session-jwt
lxml==5.3.0
# via -r requirements.in
markdown==3.6
# via
# -r requirements.in
Expand Down

0 comments on commit 77c59e3

Please sign in to comment.