(self)
| 85 | self.assertEqual(list(p([1,2,3,4])), [10, 20, 30, 40]) |
| 86 | |
| 87 | def test_attributes(self): |
| 88 | p = self.partial(capture, 1, 2, a=10, b=20) |
| 89 | # attributes should be readable |
| 90 | self.assertEqual(p.func, capture) |
| 91 | self.assertEqual(p.args, (1, 2)) |
| 92 | self.assertEqual(p.keywords, dict(a=10, b=20)) |
| 93 | |
| 94 | def test_argument_checking(self): |
| 95 | self.assertRaises(TypeError, self.partial) # need at least a func arg |
nothing calls this directly
no test coverage detected