MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_continue_outside_loop

Method test_continue_outside_loop

Lib/test/test_syntax.py:2394–2403  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2392
2393 @unittest.expectedFailure # TODO: RUSTPYTHON
2394 def test_continue_outside_loop(self):
2395 msg = "not properly in loop"
2396 self._check_error("if 0: continue", msg, lineno=1)
2397 self._check_error("if 0: continue\nelse: x=1", msg, lineno=1)
2398 self._check_error("if 1: pass\nelse: continue", msg, lineno=2)
2399 self._check_error("class C:\n if 0: continue", msg, lineno=2)
2400 self._check_error("class C:\n if 1: pass\n else: continue",
2401 msg, lineno=3)
2402 self._check_error("with object() as obj:\n continue",
2403 msg, lineno=2)
2404
2405 def test_unexpected_indent(self):
2406 self._check_error("foo()\n bar()\n", "unexpected indent",

Callers

nothing calls this directly

Calls 1

_check_errorMethod · 0.95

Tested by

no test coverage detected