MCPcopy Index your code
hub / github.com/pathwaycom/pathway / test_ix_none

Function test_ix_none

python/pathway/tests/test_common.py:2421–2449  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2419
2420
2421def test_ix_none():
2422 t_animals = T(
2423 """
2424 | genus | epithet
2425 1 | upupa | epops
2426 2 | acherontia | atropos
2427 3 | bubo | scandiacus
2428 4 | dynastes | hercules
2429 """
2430 )
2431 t_birds = T(
2432 """
2433 | desc | ptr
2434 1 | hoopoe | 2
2435 2 | owl | 4
2436 3 | brbrb |
2437 """
2438 ).with_columns(ptr=t_animals.pointer_from(pw.this.ptr, optional=True))
2439
2440 res = t_birds.select(latin=t_animals.ix(t_birds.ptr, optional=True).genus)
2441 expected = T(
2442 """
2443 | latin
2444 1 | acherontia
2445 2 | dynastes
2446 3 |
2447 """
2448 )
2449 assert_table_equality(res, expected)
2450
2451
2452def test_ix_this_getitem():

Callers

nothing calls this directly

Calls 5

TFunction · 0.90
with_columnsMethod · 0.80
pointer_fromMethod · 0.45
selectMethod · 0.45
ixMethod · 0.45

Tested by

no test coverage detected