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 04:29:09 +01:00
|
|
|
|
2014-01-26 02:15:17 +01:00
|
|
|
def test_dict_items():
|
|
|
|
assert hydict.items() == [("a", 1), ("b", 2), ("c", 3)]
|
|
|
|
|
2014-01-26 04:29:09 +01:00
|
|
|
|
2014-01-26 02:15:17 +01:00
|
|
|
def test_dict_keys():
|
|
|
|
assert hydict.keys() == ["a", "b", "c"]
|
|
|
|
|
2014-01-26 04:29:09 +01:00
|
|
|
|
2014-01-26 02:15:17 +01:00
|
|
|
def test_dict_values():
|
|
|
|
assert hydict.values() == [1, 2, 3]
|