hy/tests/models/test_dict.py

17 lines
297 B
Python
Raw Normal View History

2014-01-26 02:15:17 +01:00
from hy.models.dict import HyDict
hydict = HyDict(["a", 1, "b", 2, "c", 3])
2014-01-26 02:15:17 +01:00
def test_dict_items():
assert hydict.items() == [("a", 1), ("b", 2), ("c", 3)]
2014-01-26 02:15:17 +01:00
def test_dict_keys():
assert hydict.keys() == ["a", "b", "c"]
2014-01-26 02:15:17 +01:00
def test_dict_values():
assert hydict.values() == [1, 2, 3]