(self)
| 141 | self._check_in_scopes(code, outputs) |
| 142 | |
| 143 | def test_lambdas_with_free_var(self): |
| 144 | code = """ |
| 145 | items = [(lambda: i) for i in range(5)] |
| 146 | y = [x() for x in items] |
| 147 | """ |
| 148 | outputs = {"y": [4, 4, 4, 4, 4]} |
| 149 | self._check_in_scopes(code, outputs) |
| 150 | |
| 151 | def test_class_scope_free_var_with_class_cell(self): |
| 152 | class C: |
nothing calls this directly
no test coverage detected