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

Method test_return

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

Source from the content-addressed store, hash-verified

865 test_inner()
866
867 def test_return(self):
868 # 'return' [testlist_star_expr]
869 def g1(): return
870 def g2(): return 1
871 def g3():
872 z = [2, 3]
873 return 1, *z
874
875 g1()
876 x = g2()
877 y = g3()
878 self.assertEqual(y, (1, 2, 3), "unparenthesized star expr return")
879 check_syntax_error(self, "class foo:return 1")
880
881 def test_control_flow_in_finally(self):
882

Callers

nothing calls this directly

Calls 3

check_syntax_errorFunction · 0.90
g1Function · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected