MCPcopy Index your code
hub / github.com/python/cpython / test_starmap

Method test_starmap

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

Source from the content-addressed store, hash-verified

2341 self.assertRaises(ZeroDivisionError, list, pairwise(E(s)))
2342
2343 def test_starmap(self):
2344 for s in (range(10), range(0), range(100), (7,11), range(20,50,5)):
2345 for g in (G, I, Ig, S, L, R):
2346 ss = lzip(s, s)
2347 self.assertEqual(list(starmap(operator.pow, g(ss))),
2348 [x**x for x in g(s)])
2349 self.assertRaises(TypeError, starmap, operator.pow, X(ss))
2350 self.assertRaises(TypeError, starmap, operator.pow, N(ss))
2351 self.assertRaises(ZeroDivisionError, list, starmap(operator.pow, E(ss)))
2352
2353 def test_takewhile(self):
2354 for s in (range(10), range(0), range(1000), (7,11), range(2000,2200,5)):

Callers

nothing calls this directly

Calls 8

lzipFunction · 0.85
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