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

Method test_return

Lib/test/test_grammar.py:895–907  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

893 test_inner()
894
895 def test_return(self):
896 # 'return' [testlist_star_expr]
897 def g1(): return
898 def g2(): return 1
899 def g3():
900 z = [2, 3]
901 return 1, *z
902
903 g1()
904 x = g2()
905 y = g3()
906 self.assertEqual(y, (1, 2, 3), "unparenthesized star expr return")
907 check_syntax_error(self, "class foo:return 1")
908
909 def test_break_in_finally(self):
910 count = 0

Callers

nothing calls this directly

Calls 5

check_syntax_errorFunction · 0.90
g1Function · 0.85
g2Function · 0.85
g3Function · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected