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

Function test_json_get_item

python/pathway/tests/test_json.py:191–209  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

189
190
191def test_json_get_item():
192 input = _json_table(
193 data=[
194 {"a": {"b": 1}},
195 {"a": {"b": None}},
196 {},
197 {"a": {}},
198 {"a": [1, 2, 3]},
199 {"a": 42},
200 {"a": None},
201 ]
202 )
203
204 result = input.select(result=pw.this.data["a"]["b"])
205
206 assert_table_equality(
207 _json_table(result=[1, None, None, None, None, None, None]),
208 result,
209 )
210
211
212def test_json_get_array_index():

Callers

nothing calls this directly

Calls 2

_json_tableFunction · 0.85
selectMethod · 0.45

Tested by

no test coverage detected