[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:
Miss Islington (bot) 2024-06-26 11:29:59 +02:00 committed by GitHub
parent 5290e405c1
commit 41e1ac6a23
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 10 deletions

View file

@ -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)