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

Function test_ix_none_in_source

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

Source from the content-addressed store, hash-verified

2500
2501
2502def test_ix_none_in_source():
2503 t_animals = T(
2504 """
2505 | genus | epithet
2506 1 | upupa | epops
2507 2 | acherontia | atropos
2508 3 | bubo | scandiacus
2509 4 | | hercules
2510 """
2511 )
2512 t_birds = T(
2513 """
2514 | desc | ptr
2515 1 | hoopoe | 2
2516 2 | owl | 4
2517 """
2518 ).with_columns(ptr=t_animals.pointer_from(pw.this.ptr))
2519
2520 res = t_birds.select(latin=t_animals.ix(t_birds.ptr).genus)
2521 expected = T(
2522 """
2523 | latin
2524 1 | acherontia
2525 2 |
2526 """
2527 )
2528 assert_table_equality(res, expected)
2529
2530
2531def test_ix_no_select():

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