Pythoscope, the unit test generator

astvisitor.derive_class_name throws exception on call syntax in base classes

Reported by ryan.freckleton on 2009-10-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pythoscope
Medium
Michal Kwiatkowski

Bug Description

When attempting to initialize pythoscope against a file such as urlparse.py in the standard library, an ASTError("Unknown node type: (") exception is raised. This can easily be reproduced by runing pythoscope -i on the following class:

    class Example(namedtuple('a')):
        pass

The exception is raised on line 76 of astvisitor.py.

Attached is debug output with a detailed stack trace and the exact node that caused the problem. I've also attached a patch to test/test_static_inspector.py which uncovers this specific error.

Changed in pythoscope:
importance: Undecided → Medium
status: New → Confirmed
assignee: nobody → Michal Kwiatkowski (ruby)
Michal Kwiatkowski (ruby) wrote :

Fixed in trunk r307.

Changed in pythoscope:
status: Confirmed → Fix Committed
milestone: none → 0.4.2-dependency-cleanup
Michal Kwiatkowski (ruby) wrote :

Fix released in Pythoscope 0.4.2.

Changed in pythoscope:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments