mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
bpo-32262: Fix codestyle; use f-strings formatting where necessary. (#4775)
This commit is contained in:
parent
c4d9df5fd7
commit
6370f345e1
24 changed files with 332 additions and 348 deletions
|
@ -10,7 +10,7 @@ from asyncio import test_utils
|
|||
STR_RGX_REPR = (
|
||||
r'^<(?P<class>.*?) object at (?P<address>.*?)'
|
||||
r'\[(?P<extras>'
|
||||
r'(set|unset|locked|unlocked)(,value:\d)?(,waiters:\d+)?'
|
||||
r'(set|unset|locked|unlocked)(, value:\d)?(, waiters:\d+)?'
|
||||
r')\]>\Z'
|
||||
)
|
||||
RGX_REPR = re.compile(STR_RGX_REPR)
|
||||
|
@ -760,7 +760,7 @@ class SemaphoreTests(test_utils.TestCase):
|
|||
|
||||
def test_repr(self):
|
||||
sem = asyncio.Semaphore(loop=self.loop)
|
||||
self.assertTrue(repr(sem).endswith('[unlocked,value:1]>'))
|
||||
self.assertTrue(repr(sem).endswith('[unlocked, value:1]>'))
|
||||
self.assertTrue(RGX_REPR.match(repr(sem)))
|
||||
|
||||
self.loop.run_until_complete(sem.acquire())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue