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

Function test_error_when_wrong_indexing

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

Source from the content-addressed store, hash-verified

6332
6333
6334def test_error_when_wrong_indexing():
6335 tab = pw.Table.empty(a=int)
6336 index = tab.groupby(pw.this.a).reduce(*pw.this)
6337 with pytest.raises(
6338 TypeError,
6339 match=re.escape(
6340 "Indexing a table with a Pointer type with probably mismatched primary keys."
6341 + " Type used was Pointer(INT, INT)."
6342 + " Indexed id type was Pointer(INT).\n"
6343 + "Occurred here:\n"
6344 + " Line: index.ix_ref(tab.a, tab.a)\n"
6345 ),
6346 ):
6347 index.ix_ref(tab.a, tab.a)
6348
6349
6350def test_groupby_pointer_type():

Callers

nothing calls this directly

Calls 4

emptyMethod · 0.45
reduceMethod · 0.45
groupbyMethod · 0.45
ix_refMethod · 0.45

Tested by

no test coverage detected