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

Method test_groupby

Lib/test/test_itertools.py:2221–2227  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2219 self.assertRaises(ZeroDivisionError, list, cycle(E(s)))
2220
2221 def test_groupby(self):
2222 for s in (range(10), range(0), range(1000), (7,11), range(2000,2200,5)):
2223 for g in (G, I, Ig, S, L, R):
2224 self.assertEqual([k for k, sb in groupby(g(s))], list(g(s)))
2225 self.assertRaises(TypeError, groupby, X(s))
2226 self.assertRaises(TypeError, groupby, N(s))
2227 self.assertRaises(ZeroDivisionError, list, groupby(E(s)))
2228
2229 def test_filter(self):
2230 for s in (range(10), range(0), range(1000), (7,11), range(2000,2200,5)):

Callers

nothing calls this directly

Calls 7

listClass · 0.85
gFunction · 0.70
XClass · 0.70
NClass · 0.70
EClass · 0.70
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected