MCPcopy Index your code
hub / github.com/python/mypy / test_partial_merging

Method test_partial_merging

mypy/test/testinfer.py:167–182  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

165 )
166
167 def test_partial_merging(self) -> None:
168 d = self.new()
169 d.add_mapping({0, 1}, {"group1"})
170 d.add_mapping({1, 2}, {"group2"})
171 d.add_mapping({3, 4}, {"group3"})
172 d.add_mapping({5, 0}, {"group4"})
173 d.add_mapping({5, 6}, {"group5"})
174 d.add_mapping({4, 7}, {"group6"})
175
176 self.assertEqual(
177 d.items(),
178 [
179 ({0, 1, 2, 5, 6}, {"group1", "group2", "group4", "group5"}),
180 ({3, 4, 7}, {"group3", "group6"}),
181 ],
182 )
183
184 def test_full_merging(self) -> None:
185 d = self.new()

Callers

nothing calls this directly

Calls 3

newMethod · 0.95
add_mappingMethod · 0.80
itemsMethod · 0.45

Tested by

no test coverage detected