mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
GH-114911: use time.perf_counter in Stopwatch (GH-131469)
Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This commit is contained in:
parent
e577439803
commit
11f457cf41
3 changed files with 20 additions and 20 deletions
|
@ -1,7 +1,7 @@
|
|||
from test.support import (gc_collect, bigmemtest, _2G,
|
||||
cpython_only, captured_stdout,
|
||||
check_disallow_instantiation, linked_to_musl,
|
||||
warnings_helper, SHORT_TIMEOUT, CPUStopwatch, requires_resource)
|
||||
warnings_helper, SHORT_TIMEOUT, Stopwatch, requires_resource)
|
||||
import locale
|
||||
import re
|
||||
import string
|
||||
|
@ -2467,7 +2467,7 @@ class ReTests(unittest.TestCase):
|
|||
@requires_resource('cpu')
|
||||
def test_search_anchor_at_beginning(self):
|
||||
s = 'x'*10**7
|
||||
with CPUStopwatch() as stopwatch:
|
||||
with Stopwatch() as stopwatch:
|
||||
for p in r'\Ay', r'^y':
|
||||
self.assertIsNone(re.search(p, s))
|
||||
self.assertEqual(re.split(p, s), [s])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue