(self)
| 269 | self.assertEqual(p2(1), ((1, 0), {})) |
| 270 | |
| 271 | def test_placeholders_kw_restriction(self): |
| 272 | PH = self.module.Placeholder |
| 273 | with self.assertRaisesRegex(TypeError, "Placeholder"): |
| 274 | self.partial(capture, a=PH) |
| 275 | # Passes, as checks via `is` and not `eq` |
| 276 | p = self.partial(capture, a=ALWAYS_EQ) |
| 277 | actual_args, actual_kwds = p() |
| 278 | self.assertEqual(actual_args, ()) |
| 279 | self.assertEqual(len(actual_kwds), 1) |
| 280 | self.assertIs(actual_kwds['a'], ALWAYS_EQ) |
| 281 | |
| 282 | def test_construct_placeholder_singleton(self): |
| 283 | PH = self.module.Placeholder |
nothing calls this directly
no test coverage detected