python-goto icon indicating copy to clipboard operation
python-goto copied to clipboard

cross-loop test failed

Open igolotin opened this issue 4 years ago • 0 comments

I had tried to build the latest version since PyPI contains outdated one. The unit test failed twice when expecting SyntaxError protection against make goto in a loop scope.

    def test_jump_into_loop():
        def func():
            for i in range(10):
                label .loop
            goto .loop

>       pytest.raises(SyntaxError, with_goto, func)
E       Failed: DID NOT RAISE <class 'SyntaxError'>

I checked the code manually in the ipython, the func really avoid raising exceptions and hangs the python if called.

platform win32 -- Python 3.9.6, pytest-6.2.5, py-1.10.0, pluggy-1.0.0

igolotin avatar Oct 26 '21 21:10 igolotin