from test.support import (gc_collect, bigmemtest, _2G,
cpython_only, captured_stdout,
check_disallow_instantiation, is_emscripten, is_wasi,
- warnings_helper, SHORT_TIMEOUT, CPUStopwatch)
+ warnings_helper, SHORT_TIMEOUT, CPUStopwatch, requires_resource)
import locale
import re
import string
with self.assertRaisesRegex(TypeError, "got 'type'"):
re.search("x*", type)
+ # gh-117594: The test is not slow by itself, but it relies on
+ # the absolute computation time and can fail on very slow computers.
+ @requires_resource('cpu')
def test_search_anchor_at_beginning(self):
s = 'x'*10**7
with CPUStopwatch() as stopwatch: