(self)
| 110 | self.assertEqual(test_func(5), 47) |
| 111 | |
| 112 | def testMixedFreevarsAndCellvars(self): |
| 113 | |
| 114 | def identity(x): |
| 115 | return x |
| 116 | |
| 117 | def f(x, y, z): |
| 118 | def g(a, b, c): |
| 119 | a = a + x # 3 |
| 120 | def h(): |
| 121 | # z * (4 + 9) |
| 122 | # 3 * 13 |
| 123 | return identity(z * (b + y)) |
| 124 | y = c + z # 9 |
| 125 | return h |
| 126 | return g |
| 127 | |
| 128 | g = f(1, 2, 3) |
| 129 | h = g(2, 4, 6) |
| 130 | self.assertEqual(h(), 39) |
| 131 | |
| 132 | def testFreeVarInMethod(self): |
| 133 |
nothing calls this directly
no test coverage detected