()
| 2390 | |
| 2391 | |
| 2392 | def test_ix(): |
| 2393 | t_animals = T( |
| 2394 | """ |
| 2395 | | genus | epithet |
| 2396 | 1 | upupa | epops |
| 2397 | 2 | acherontia | atropos |
| 2398 | 3 | bubo | scandiacus |
| 2399 | 4 | dynastes | hercules |
| 2400 | """ |
| 2401 | ) |
| 2402 | t_birds = T( |
| 2403 | """ |
| 2404 | | desc | ptr |
| 2405 | 1 | hoopoe | 2 |
| 2406 | 2 | owl | 4 |
| 2407 | """ |
| 2408 | ).with_columns(ptr=t_animals.pointer_from(pw.this.ptr)) |
| 2409 | |
| 2410 | res = t_birds.select(latin=t_animals.ix(t_birds.ptr).genus) |
| 2411 | expected = T( |
| 2412 | """ |
| 2413 | | latin |
| 2414 | 1 | acherontia |
| 2415 | 2 | dynastes |
| 2416 | """ |
| 2417 | ) |
| 2418 | assert_table_equality(res, expected) |
| 2419 | |
| 2420 | |
| 2421 | def test_ix_none(): |
nothing calls this directly
no test coverage detected