()
| 29 | |
| 30 | |
| 31 | def test_check_wiki_example(): |
| 32 | code = """ |
| 33 | class MyInt(int): |
| 34 | def __init__(self, i): |
| 35 | super().__init__(i + 1) |
| 36 | """ |
| 37 | s = setup_state(code, code) |
| 38 | s.check_class_def("MyInt").multi( |
| 39 | check_bases(0).has_equal_ast(), |
| 40 | check_body() |
| 41 | .check_function_def("__init__") |
| 42 | .multi( |
| 43 | check_args("self"), |
| 44 | check_args("i"), |
| 45 | check_body() |
| 46 | .set_context(i=2) |
| 47 | .multi( |
| 48 | check_function("super", signature=False), |
| 49 | check_function("super.__init__").check_args(0).has_equal_value(), |
| 50 | ), |
| 51 | ), |
| 52 | ) |
nothing calls this directly
no test coverage detected