MCPcopy Create free account
hub / github.com/Distributive-Network/PythonMonkey / test_pop_not_found

Function test_pop_not_found

tests/python/test_dict_methods.py:87–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85
86
87def test_pop_not_found():
88 likes = pm.eval('({"color": "blue", "fruit": "apple", "pet": "dog"})')
89 try:
90 likes.pop('colo')
91 assert (False)
92 except Exception as e:
93 assert str(type(e)) == "<class 'KeyError'>"
94 assert str(e) == "'colo'"
95
96
97def test_pop_twice_not_found():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected