File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -182,14 +182,18 @@ def testAppendChildNoQuadraticComplexity(self):
182182 children = [newdoc .createElement (f"child-{ i } " ) for i in range (1 , 2 ** 15 + 1 )]
183183 element = top_element
184184
185- start = time .time ()
185+ start = time .monotonic ()
186186 for child in children :
187187 element .appendChild (child )
188188 element = child
189- end = time .time ()
189+ end = time .monotonic ()
190190
191191 # This example used to take at least 30 seconds.
192- self .assertLess (end - start , 1 )
192+ # Conservative assertion due to the wide variety of systems and
193+ # build configs timing based tests wind up run under.
194+ # A --with-address-sanitizer --with-pydebug build on a rpi5 still
195+ # completes this loop in <0.5 seconds.
196+ self .assertLess (end - start , 4 )
193197
194198 def testSetAttributeNodeWithoutOwnerDocument (self ):
195199 # regression test for gh-142754
You can’t perform that action at this time.
0 commit comments