mirror of
https://github.com/python/cpython.git
synced 2025-10-06 15:11:58 +00:00
gh-83035: handle decorator with nested parens in inspect.getsource (GH-99654)
(cherry picked from commit 68e41295b8
)
Co-authored-by: Carl Meyer <carl@oddbird.net>
This commit is contained in:
parent
2b97ddd512
commit
2997f3913a
4 changed files with 22 additions and 9 deletions
|
@ -886,6 +886,12 @@ class TestNoEOL(GetSourceBase):
|
|||
self.assertSourceEqual(self.fodderModule.X, 1, 2)
|
||||
|
||||
|
||||
class TestComplexDecorator(GetSourceBase):
|
||||
fodderModule = mod2
|
||||
|
||||
def test_parens_in_decorator(self):
|
||||
self.assertSourceEqual(self.fodderModule.complex_decorated, 273, 275)
|
||||
|
||||
class _BrokenDataDescriptor(object):
|
||||
"""
|
||||
A broken data descriptor. See bug #1785.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue