(self)
| 135 | self.assertNotIn('__builtins__', ns['func4'].__globals__) |
| 136 | |
| 137 | def test___closure__(self): |
| 138 | a = 12 |
| 139 | def f(): print(a) |
| 140 | c = f.__closure__ |
| 141 | self.assertIsInstance(c, tuple) |
| 142 | self.assertEqual(len(c), 1) |
| 143 | # don't have a type object handy |
| 144 | self.assertEqual(c[0].__class__.__name__, "cell") |
| 145 | self.cannot_set_attr(f, "__closure__", c, AttributeError) |
| 146 | |
| 147 | def test_cell_new(self): |
| 148 | cell_obj = types.CellType(1) |
nothing calls this directly
no test coverage detected