mirror of
https://github.com/python/cpython.git
synced 2025-08-15 22:30:42 +00:00
[3.12] gh-121025: Improve partialmethod.__repr__ (GH-121033) (GH-121038)
It no longer contains redundant commas and spaces.
(cherry picked from commit d2646e3f45
)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
This commit is contained in:
parent
5290e405c1
commit
41e1ac6a23
4 changed files with 18 additions and 10 deletions
|
@ -2351,7 +2351,7 @@ class HandleTests(test_utils.TestCase):
|
|||
h = asyncio.Handle(cb, (), self.loop)
|
||||
|
||||
cb_regex = r'<function HandleTests.test_handle_repr .*>'
|
||||
cb_regex = fr'functools.partialmethod\({cb_regex}, , \)\(\)'
|
||||
cb_regex = fr'functools.partialmethod\({cb_regex}\)\(\)'
|
||||
regex = fr'^<Handle {cb_regex} at {re.escape(filename)}:{lineno}>$'
|
||||
self.assertRegex(repr(h), regex)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue