(self)
| 14 | self.context = EmitterContext(NameGenerator([["mod"]]), True) |
| 15 | |
| 16 | def test_check_list(self) -> None: |
| 17 | emitter = Emitter(self.context) |
| 18 | generate_arg_check("x", list_rprimitive, emitter, ReturnHandler("NULL")) |
| 19 | lines = emitter.fragments |
| 20 | self.assert_lines( |
| 21 | [ |
| 22 | "PyObject *arg_x;", |
| 23 | "if (likely(PyList_Check(obj_x)))", |
| 24 | " arg_x = obj_x;", |
| 25 | "else {", |
| 26 | ' CPy_TypeError("list", obj_x);', |
| 27 | " return NULL;", |
| 28 | "}", |
| 29 | ], |
| 30 | lines, |
| 31 | ) |
| 32 | |
| 33 | def test_check_int(self) -> None: |
| 34 | emitter = Emitter(self.context) |
nothing calls this directly
no test coverage detected