Add tests for HyDict methods
This commit is contained in:
parent
0177541d9b
commit
cef7091708
13
tests/models/test_dict.py
Normal file
13
tests/models/test_dict.py
Normal 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]
|
Loading…
Reference in New Issue
Block a user