

def test_calling_method_from_init(self):

    class MyClass11():

        def __init__(self):
            self._res = ((self.m1() + self.m2()) + self.m3())

        def m1(self):
            return 100

        def m2(self):
            return 10

    class MyClass12(MyClass11):

        def m2(self):
            return 20

        def m3(self):
            return 2
    code = (py2js(MyClass11) + py2js(MyClass12))
    assert (evaljs((code + 'var m = new MyClass12(); m._res')) == '122')
    assert (evaljs((code + 'var m = new MyClass12(); m.m1()')) == '100')

dataset/ETHPy150Open zoofIO/flexx/flexx/pyscript/tests/test_parser2.py TestClasses.test_calling_method_from_init/original