This is an automated email from the ASF dual-hosted git repository.
brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git
The following commit(s) were added to refs/heads/master by this push:
new 008e465fa test speedup: smarter bs4 parser selection
008e465fa is described below
commit 008e465fac5000e397c6dd31c9030b62ac794bfc
Author: Dave Brondsema <[email protected]>
AuthorDate: Tue Oct 29 12:09:00 2024 -0400
test speedup: smarter bs4 parser selection
---
AlluraTest/alluratest/controller.py | 3 ++-
requirements-dev.txt | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/AlluraTest/alluratest/controller.py
b/AlluraTest/alluratest/controller.py
index a88a1f796..040677cb7 100644
--- a/AlluraTest/alluratest/controller.py
+++ b/AlluraTest/alluratest/controller.py
@@ -26,6 +26,7 @@ import json
import mock
import beaker.session
+from bs4 import BeautifulSoup
from formencode import variabledecode
from paste.deploy import loadapp
from paste.deploy.converters import asbool
@@ -177,7 +178,7 @@ class TestController:
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='lxml', # fastest bs4 parser (otherwise WebTest
defaults to html.parser)
+ parser_features=BeautifulSoup.DEFAULT_BUILDER_FEATURES, # 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:
diff --git a/requirements-dev.txt b/requirements-dev.txt
index ec1568631..4e4a7bfab 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -1,6 +1,7 @@
# development-only dependencies
# nothing needed at runtime or for tests
+lxml # faster resp.html parsing in tests
pip-tools
q
sphinx-argparse