MCPcopy Create free account
hub / github.com/pathwaycom/pathway / test_pointer_eq

Function test_pointer_eq

python/pathway/tests/test_operators.py:638–666  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

636
637
638def test_pointer_eq():
639 t = T(
640 """
641 | true_id | false_id
642 1 | 1 | 2
643 2 | 2 | 3
644 3 | 3 | 1
645 """
646 )
647 t = t.select(
648 *pw.this,
649 true_pointer=pw.this.pointer_from(t.true_id),
650 false_pointer=pw.this.pointer_from(t.false_id),
651 )
652 res = t.select(
653 a=(t.id == t.true_pointer),
654 b=(t.id == t.false_pointer),
655 c=(t.id != t.true_pointer),
656 d=(t.id != t.false_pointer),
657 )
658 expected = T(
659 """
660 | a | b | c | d
661 1 | True | False | False | True
662 2 | True | False | False | True
663 3 | True | False | False | True
664 """
665 )
666 assert_table_equality(res, expected)
667
668
669def test_pointer_order():

Callers

nothing calls this directly

Calls 3

TFunction · 0.90
selectMethod · 0.45
pointer_fromMethod · 0.45

Tested by

no test coverage detected