https://github.com/python/cpython/commit/24494412429896512721a2cd7cfd68a325e78a89
commit: 24494412429896512721a2cd7cfd68a325e78a89
branch: 3.12
author: Donghee Na <[email protected]>
committer: corona10 <[email protected]>
date: 2024-04-08T00:23:55Z
summary:

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

gh-117594: Require cpu resource to test_search_anchor_at_beginning (gh-117595)

(cherry picked from commit 784623c63c45a4d13dfb04318c39fdb1ab790218)

files:
M Lib/test/test_re.py

diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
index 656429ba8522a1..e279412efbc52c 100644
--- a/Lib/test/test_re.py
+++ b/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
@@ -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()

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to