()
| 155 | |
| 156 | |
| 157 | def test_json_array_get_str_index(): |
| 158 | input = _json_table( |
| 159 | data=[ |
| 160 | {"a": [1, 2, 3]}, |
| 161 | ] |
| 162 | ) |
| 163 | |
| 164 | result = input.select(result=pw.this.data["a"].get("foo")) |
| 165 | |
| 166 | assert_table_equality( |
| 167 | T( |
| 168 | """ |
| 169 | | result |
| 170 | 1 | |
| 171 | """ |
| 172 | ).update_types(result=Optional[pw.Json]), |
| 173 | result, |
| 174 | ) |
| 175 | |
| 176 | |
| 177 | def test_json_get_wrong_default(): |
nothing calls this directly
no test coverage detected