Add tests for HyDict methods

This commit is contained in:
Brian McKenna 2014-01-25 18:15:17 -07:00
parent 0177541d9b
commit cef7091708

13
tests/models/test_dict.py Normal file
View File

@ -0,0 +1,13 @@
from hy.models.dict import HyDict
hydict = HyDict(["a", 1, "b", 2, "c", 3])
def test_dict_items():
assert hydict.items() == [("a", 1), ("b", 2), ("c", 3)]
def test_dict_keys():
assert hydict.keys() == ["a", "b", "c"]
def test_dict_values():
assert hydict.values() == [1, 2, 3]