(self)
| 426 | ) |
| 427 | |
| 428 | def test_unbox_vec_nested(self) -> None: |
| 429 | self.assert_emit( |
| 430 | Unbox(self.o, RVec(RVec(str_rprimitive)), 55), |
| 431 | """cpy_r_r0 = VecNestedApi.unbox(cpy_r_o, (size_t)&PyUnicode_Type, 1); |
| 432 | if (VEC_IS_ERROR(cpy_r_r0)) { |
| 433 | CPy_TypeError("vec[vec[str]]", cpy_r_o); cpy_r_r0 = (VecNested) { -1, NULL }; |
| 434 | } |
| 435 | """, |
| 436 | ) |
| 437 | self.assert_emit( |
| 438 | Unbox(self.o, RVec(RVec(RUnion([str_rprimitive, none_rprimitive]))), 55), |
| 439 | """cpy_r_r0 = VecNestedApi.unbox(cpy_r_o, ((size_t)&PyUnicode_Type | 1), 1); |
| 440 | if (VEC_IS_ERROR(cpy_r_r0)) { |
| 441 | CPy_TypeError("vec[vec[str | None]]", cpy_r_o); cpy_r_r0 = (VecNested) { -1, NULL }; |
| 442 | } |
| 443 | """, |
| 444 | ) |
| 445 | self.assert_emit( |
| 446 | Unbox(self.o, RVec(RVec(int64_rprimitive)), 55), |
| 447 | """cpy_r_r0 = VecNestedApi.unbox(cpy_r_o, 2, 1); |
| 448 | if (VEC_IS_ERROR(cpy_r_r0)) { |
| 449 | CPy_TypeError("vec[vec[i64]]", cpy_r_o); cpy_r_r0 = (VecNested) { -1, NULL }; |
| 450 | } |
| 451 | """, |
| 452 | ) |
| 453 | |
| 454 | def test_list_append(self) -> None: |
| 455 | self.assert_emit( |
nothing calls this directly
no test coverage detected