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

Function test_flatten_simple

python/pathway/tests/test_flatten.py:14–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12
13
14def test_flatten_simple():
15 tab = T(pd.DataFrame.from_dict({"col": [[1, 2, 3, 4]]}), format="pandas")
16
17 assert_table_equality_wo_index(
18 tab.flatten(this.col, origin_id="origin_id"),
19 T(
20 """
21 col | origin_id
22 1 | 0
23 2 | 0
24 3 | 0
25 4 | 0
26 """,
27 ).with_columns(origin_id=tab.pointer_from(this.origin_id)),
28 )
29
30
31def test_flatten_no_origin():

Callers

nothing calls this directly

Calls 4

TFunction · 0.90
flattenMethod · 0.80
with_columnsMethod · 0.80
pointer_fromMethod · 0.45

Tested by

no test coverage detected