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 b2e831b14 test speedup: response.html faster parser
b2e831b14 is described below

commit b2e831b14466be74a5405afb90e17fef702bb00c
Author: Dave Brondsema <[email protected]>
AuthorDate: Tue Oct 29 11:44:16 2024 -0400

    test speedup: response.html faster parser
---
 AlluraTest/alluratest/controller.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/AlluraTest/alluratest/controller.py 
b/AlluraTest/alluratest/controller.py
index 55ef5d94e..a88a1f796 100644
--- a/AlluraTest/alluratest/controller.py
+++ b/AlluraTest/alluratest/controller.py
@@ -175,8 +175,10 @@ class TestController:
 
     def setup_method(self, method=None):
         pkg = self.__module__.split('.')[0]
-        self.app = ValidatingTestApp(
-            setup_functional_test(app_name=self.application_under_test, 
current_pkg=pkg))
+        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)
+        )
         self.app.extra_environ = {'REMOTE_ADDR': '127.0.0.1'}  # remote_addr 
needed by AntiSpam
         if self.validate_skip:
             self.app.validate_skip = self.validate_skip

Reply via email to