MCPcopy
hub / github.com/pathwaycom/pathway / test_tuples_none_cmp

Function test_tuples_none_cmp

python/pathway/tests/test_operators.py:1436–1455  ·  view source on GitHub ↗
(op)

Source from the content-addressed store, hash-verified

1434
1435@pytest.mark.parametrize("op", [operator.lt, operator.le, operator.gt, operator.ge])
1436def test_tuples_none_cmp(op):
1437 table = T(
1438 """
1439 a | b
1440 1 |
1441 |
1442 1 | 1
1443 """
1444 ).with_columns(
1445 x=pw.make_tuple(pw.this.a, pw.this.b), y=pw.make_tuple(pw.this.b, pw.this.a)
1446 )
1447
1448 with pytest.raises(
1449 TypeError,
1450 match=re.escape(
1451 f"Pathway does not support using binary operator {op.__name__} on columns "
1452 "of types tuple[int | None, int | None], tuple[int | None, int | None].",
1453 ),
1454 ):
1455 table.select(z=op(pw.this.x, pw.this.y))
1456
1457
1458def test_and_or_are_lazy():

Callers

nothing calls this directly

Calls 3

TFunction · 0.90
with_columnsMethod · 0.80
selectMethod · 0.45

Tested by

no test coverage detected