MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_conversions

Method test_conversions

Lib/test/test_collections.py:2248–2254  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2246 self.assertEqual(type(d), type(c))
2247
2248 def test_conversions(self):
2249 # Convert to: set, list, dict
2250 s = 'she sells sea shells by the sea shore'
2251 self.assertEqual(sorted(Counter(s).elements()), sorted(s))
2252 self.assertEqual(sorted(Counter(s)), sorted(set(s)))
2253 self.assertEqual(dict(Counter(s)), dict(Counter(s).items()))
2254 self.assertEqual(set(Counter(s)), set(s))
2255
2256 def test_invariant_for_the_in_operator(self):
2257 c = Counter(a=10, b=-2, c=0)

Callers

nothing calls this directly

Calls 6

CounterClass · 0.90
sortedFunction · 0.85
setFunction · 0.85
assertEqualMethod · 0.45
elementsMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected