CS2613/labs/L15/test_list2dict.py

11 lines
195 B
Python
Raw Normal View History

2022-11-02 10:02:15 -03:00
from list2dict import list2dict
def test_empty():
assert list2dict([]) == {}
def test_abc():
dictionary = list2dict(["a", "b", "c"])
assert dictionary == {1: 'a', 2: 'b', 3: 'c'}