@skipif(sys.version_info < (3,), reason='no nonlocal on legacy Python')
    def test_nonlocal(self):
        assert py2js('nonlocal foo;foo = 3').strip() == 'foo = 3;'
        
        func3_code = """def func3():
            def inner():
                nonlocal x
                x = 3
            x = 2
            inner()
            return x
        """
        assert evaljs(py2js(func3_code)+'func3()') == '3'
dataset/ETHPy150Open zoofIO/flexx/flexx/pyscript/tests/test_parser2.py/TestFunctions.test_nonlocal/original