MCPcopy Create free account
hub / github.com/coooodeer/parse-rust / test_dot_separated_fields_name_collisions

Function test_dot_separated_fields_name_collisions

tests/test_pattern.py:85–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

83
84
85def test_dot_separated_fields_name_collisions():
86 # this should just work and provide the named value
87 res = parse.parse("{a_.b}_{a__b}_{a._b}_{a___b}", "a_b_c_d")
88 assert res.named["a_.b"] == "a"
89 assert res.named["a__b"] == "b"
90 assert res.named["a._b"] == "c"
91 assert res.named["a___b"] == "d"
92
93
94def test_invalid_groupnames_are_handled_gracefully():

Callers

nothing calls this directly

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected