gh-121025: Improve partialmethod.__repr__ (GH-121033)

It no longer contains redundant commas and spaces.
This commit is contained in:
Bénédikt Tran 2024-06-26 11:08:27 +02:00 committed by GitHub
parent d8f82432a3
commit d2646e3f45
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 10 deletions

View file

@ -2348,7 +2348,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)