(self)
| 70 | return ast.Attribute(value=ast.Name(id=UT), attr=self.ut_method) |
| 71 | |
| 72 | def as_ast_node(self) -> ast.Attribute | ast.Call: |
| 73 | if not self.ut_method.has_args(): |
| 74 | return self._attr_node |
| 75 | |
| 76 | args = [] |
| 77 | if self.cond: |
| 78 | args.append(ast.parse(self.cond).body[0].value) |
| 79 | args.append(ast.Constant(value=self._reason)) |
| 80 | |
| 81 | return ast.Call(func=self._attr_node, args=args, keywords=[]) |
| 82 | |
| 83 | def as_decorator(self) -> str: |
| 84 | unparsed = ast.unparse(self.as_ast_node()) |
no test coverage detected