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

Method test_starmap

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

Source from the content-addressed store, hash-verified

2293 self.assertRaises(ZeroDivisionError, list, pairwise(E(s)))
2294
2295 def test_starmap(self):
2296 for s in (range(10), range(0), range(100), (7,11), range(20,50,5)):
2297 for g in (G, I, Ig, S, L, R):
2298 ss = lzip(s, s)
2299 self.assertEqual(list(starmap(operator.pow, g(ss))),
2300 [x**x for x in g(s)])
2301 self.assertRaises(TypeError, starmap, operator.pow, X(ss))
2302 self.assertRaises(TypeError, starmap, operator.pow, N(ss))
2303 self.assertRaises(ZeroDivisionError, list, starmap(operator.pow, E(ss)))
2304
2305 def test_takewhile(self):
2306 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