()
| 81 | |
| 82 | |
| 83 | def test_unpack_col_schema(): |
| 84 | class TestSchema(pw.Schema): |
| 85 | coord1: int |
| 86 | coord2: float |
| 87 | coord3: str |
| 88 | |
| 89 | data = T( |
| 90 | """ |
| 91 | | a | b | c |
| 92 | 1 | 11 | 1.1 | abc |
| 93 | 2 | 12 | 1.2 | def |
| 94 | 3 | 13 | 1.3 | ghi |
| 95 | """ |
| 96 | ) |
| 97 | data = data.select(combined=pw.make_tuple(pw.this.a, pw.this.b, pw.this.c)) |
| 98 | result = unpack_col(data.combined, schema=TestSchema) |
| 99 | assert_table_equality( |
| 100 | result, |
| 101 | T( |
| 102 | """ |
| 103 | | coord1 | coord2 | coord3 |
| 104 | 1 | 11 | 1.1 | abc |
| 105 | 2 | 12 | 1.2 | def |
| 106 | 3 | 13 | 1.3 | ghi |
| 107 | """ |
| 108 | ), |
| 109 | ) |
| 110 | |
| 111 | |
| 112 | def test_apply_all_rows(): |
nothing calls this directly
no test coverage detected