doesn't handle nested classes

Bug #260924 reported by Paul Hildebrandt
2
Affects Status Importance Assigned to Milestone
Pythoscope
Fix Released
Medium
Michal Kwiatkowski

Bug Description

Pythoscope doesn't understand nested classes.

Test Code:
class mainClass:
    def __init__(self): pass
    def mainClassMethod(self): pass
    class subClass:
        def __init__(self): pass
        def subClassMethod(self): pass

This generates:
import unittest

class TestMainClass(unittest.TestCase):
    def test_object_initialization(self):
        assert False # TODO: implement your test here

    def test_mainClassMethod(self):
        assert False # TODO: implement your test here

    def test_object_initialization(self):
        assert False # TODO: implement your test here

    def test_subClassMethod(self):
        assert False # TODO: implement your test here

if __name__ == '__main__':
    unittest.main()

There is no differentiation between class and subclass in test case. Specifically the object_initialization is duplicated.

Paul

Related branches

Revision history for this message
Michal Kwiatkowski (ruby) wrote :

Fixed in revision 64.

Changed in pythoscope:
assignee: nobody → ruby
importance: Undecided → Medium
milestone: none → static-analysis
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.