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

Function test_json_get_wo_default

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

Source from the content-addressed store, hash-verified

122
123
124def test_json_get_wo_default():
125 input = _json_table(
126 data=[
127 {"a": {"b": 1}},
128 ]
129 )
130
131 with pytest.raises(
132 TypeError, match=re.escape(rf"Cannot get from {pw.Json | None}.")
133 ):
134 input.select(result=pw.this.data.get("a").get("b"))
135
136
137def test_json_dict_get_int_index():

Callers

nothing calls this directly

Calls 3

_json_tableFunction · 0.85
selectMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected