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

Function test_ix_missing_key

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

Source from the content-addressed store, hash-verified

2480
2481
2482def test_ix_missing_key():
2483 t_animals = T(
2484 """
2485 | genus | epithet
2486 1 | upupa | epops
2487 2 | acherontia | atropos
2488 """
2489 )
2490 t_birds = T(
2491 """
2492 | desc | ptr
2493 1 | hoopoe | 1
2494 2 | owl | 3
2495 """
2496 ).with_columns(ptr=t_animals.pointer_from(pw.this.ptr))
2497 t_birds.select(latin=t_animals.ix(t_birds.ptr).genus)
2498 with pytest.raises(KeyError):
2499 run_all()
2500
2501
2502def test_ix_none_in_source():

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected