Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.12] gh-117594: Require cpu resource to test_search_anchor_at_beginning (g… #117616

Merged
merged 1 commit into from Apr 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion Lib/test/test_re.py
@@ -1,7 +1,7 @@
from test.support import (gc_collect, bigmemtest, _2G,
cpython_only, captured_stdout,
check_disallow_instantiation, is_emscripten, is_wasi,
SHORT_TIMEOUT)
SHORT_TIMEOUT, requires_resource)
import locale
import re
import string
Expand Down Expand Up @@ -2217,6 +2217,9 @@ def test_bug_40736(self):
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
start = time.perf_counter()
Expand Down