def test_fail(self): self.assertRaises(AssertionError, MaxLen(8, 'other'), self.item)
def test_ok(self): MaxLen(8, 'name')(self.item) MaxLen(8, 'xxx')(self.item)