MCPcopy Index your code
hub / github.com/python/cpython / test_continue_outside_loop

Method test_continue_outside_loop

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

Source from the content-addressed store, hash-verified

3086 msg, lineno=2)
3087
3088 def test_continue_outside_loop(self):
3089 msg = "not properly in loop"
3090 self._check_error("if 0: continue", msg, lineno=1)
3091 self._check_error("if 0: continue\nelse: x=1", msg, lineno=1)
3092 self._check_error("if 1: pass\nelse: continue", msg, lineno=2)
3093 self._check_error("class C:\n if 0: continue", msg, lineno=2)
3094 self._check_error("class C:\n if 1: pass\n else: continue",
3095 msg, lineno=3)
3096 self._check_error("with object() as obj:\n continue",
3097 msg, lineno=2)
3098
3099 def test_unexpected_indent(self):
3100 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