

def test_inheritance_super_more(self):

    class MyClass4():

        def foo(self):
            return self

    class MyClass5(MyClass4):

        def foo(self, test):
            return super().foo()

    def foo():
        return super().foo()
    code = (py2js(MyClass4) + py2js(MyClass5))
    code += py2js(foo).replace('super()', 'MyClass4.prototype')
    code += 'var m4=new MyClass4(), m5=new MyClass5();'
    assert (evaljs((code + 'm4.foo() === m4')) == 'true')
    assert (evaljs((code + 'm4.foo() === m4')) == 'true')
    assert (evaljs((code + 'foo.call(m4) === m4')) == 'true')

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