| 6332 | |
| 6333 | |
| 6334 | def 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 | |
| 6350 | def test_groupby_pointer_type(): |