Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_with_single_decorator(self) -> None:
@decorator_plus_1
def func() -> int:
return 0
self.assertListEqual([1, 0], [a_func() for a_func in icontract._checkers._walk_decorator_stack(func)])
def test_with_double_decorator(self) -> None:
@decorator_plus_2
@decorator_plus_1
def func() -> int:
return 0
self.assertListEqual([3, 1, 0], [a_func() for a_func in icontract._checkers._walk_decorator_stack(func)])
def test_wo_decorators(self) -> None:
def func() -> int:
return 0
self.assertListEqual([0], [a_func() for a_func in icontract._checkers._walk_decorator_stack(func)])