python-goto
python-goto copied to clipboard
cross-loop test failed
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