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

Function test_items_or

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

Source from the content-addressed store, hash-verified

463
464
465def test_items_or():
466 dishes = pm.eval("({'eggs': 2, 'sausage': 1, 'bacon': 1, 'spam': 500})")
467 items = dishes.items()
468 others = items | [('juice', 'apple')]
469 assert others == {('spam', 500.0), ('juice', 'apple'), ('eggs', 2.0), ('sausage', 1.0), ('bacon', 1.0)}
470 others = [('juice', 'raisin')] | items
471 assert others == {('spam', 500.0), ('juice', 'raisin'), ('eggs', 2.0), ('sausage', 1.0), ('bacon', 1.0)}
472
473
474def test_items_xor():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected