mirror of
https://github.com/python/cpython.git
synced 2025-12-09 18:48:05 +00:00
gh-121025: Improve partialmethod.__repr__ (GH-121033)
It no longer contains redundant commas and spaces.
This commit is contained in:
parent
d8f82432a3
commit
d2646e3f45
4 changed files with 18 additions and 10 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue