MCPcopy Create free account
hub / github.com/grantjenks/python-sortedcontainers / test_eq

Function test_eq

tests/test_coverage_sorteddict.py:83–97  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81 assert all((temp[val] == pos) for pos, val in enumerate(string.ascii_lowercase))
82
83def test_eq():
84 mapping = [(val, pos) for pos, val in enumerate(string.ascii_lowercase)]
85 temp1 = SortedDict(mapping)
86 temp2 = SortedDict(mapping)
87 assert temp1 == temp2
88 assert not (temp1 != temp2)
89 temp2['a'] = 100
90 assert temp1 != temp2
91 assert not (temp1 == temp2)
92 del temp2['a']
93 assert temp1 != temp2
94 assert not (temp1 == temp2)
95 temp2['zz'] = 0
96 assert temp1 != temp2
97 assert not (temp1 == temp2)
98
99def test_iter():
100 mapping = [(val, pos) for pos, val in enumerate(string.ascii_lowercase)]

Callers

nothing calls this directly

Calls 1

SortedDictClass · 0.90

Tested by

no test coverage detected