def test_lambda_no_arg_kwargs(self):
with self.assertRaises(exc.CompileError) as ex:
self.compile(Lambda(lambda x, *args: x * 2))
self.assertEqual(
str(ex.exception),
'Lambdas with *args are not supported'
)
with self.assertRaises(exc.CompileError) as ex:
self.compile(Lambda(lambda x, **kwargs: x * 2))
self.assertEqual(
str(ex.exception),
'Lambdas with **kwargs are not supported'
)
评论列表
文章目录