def test_update(): v = Dictionary({"a": 1, "b": 2, "c": 3}) v.update({"a": "one", "d": "four"}) v.update(Dictionary({"b": "two", "e": "five"})) assert list(v.keys()) == [ GDString("a"), GDString("b"), GDString("c"), GDString("d"), GDString("e"), ] assert list(v.values()) == [ GDString("one"), GDString("two"), 3, GDString("four"), GDString("five"), ]
def test_keys(): v = Dictionary({"a": 1, 2: "foo", 0.5: Vector2()}) keys = v.keys() assert list(keys) == [GDString("a"), 2, 0.5]