mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
Make tabnanny recognize IndentationErrors raised by tokenize.
Add a test to test_inspect to make sure indented source is recognized correctly. (fixes #1224621)
This commit is contained in:
parent
26a07b5198
commit
2463f8f831
4 changed files with 18 additions and 1 deletions
|
|
@ -274,6 +274,9 @@ class TestBuggyCases(GetSourceBase):
|
|||
def test_with_comment_instead_of_docstring(self):
|
||||
self.assertSourceEqual(mod2.func88, 88, 90)
|
||||
|
||||
def test_method_in_dynamic_class(self):
|
||||
self.assertSourceEqual(mod2.method_in_dynamic_class, 95, 97)
|
||||
|
||||
# Helper for testing classify_class_attrs.
|
||||
def attrs_wo_objs(cls):
|
||||
return [t[:3] for t in inspect.classify_class_attrs(cls)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue