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

Function test_tuples_none

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

Source from the content-addressed store, hash-verified

1404
1405
1406def test_tuples_none():
1407 table = T(
1408 """
1409 a | b
1410 1 |
1411 |
1412 1 | 1
1413 """
1414 ).with_columns(
1415 x=pw.make_tuple(pw.this.a, pw.this.b), y=pw.make_tuple(pw.this.b, pw.this.a)
1416 )
1417
1418 result = table.select(
1419 pw.this.a,
1420 pw.this.b,
1421 eq=pw.this.x == pw.this.y,
1422 ne=pw.this.x != pw.this.y,
1423 )
1424 expected = T(
1425 """
1426 a | b | eq | ne
1427 1 | | False | True
1428 | | True | False
1429 1 | 1 | True | False
1430 """
1431 )
1432 assert_table_equality(result, expected)
1433
1434
1435@pytest.mark.parametrize("op", [operator.lt, operator.le, operator.gt, operator.ge])

Callers

nothing calls this directly

Calls 3

TFunction · 0.90
with_columnsMethod · 0.80
selectMethod · 0.45

Tested by

no test coverage detected