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

Method test_map

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

Source from the content-addressed store, hash-verified

2263 self.assertRaises(ZeroDivisionError, list, zip_longest(E(s)))
2264
2265 def test_map(self):
2266 for s in (range(10), range(0), range(100), (7,11), range(20,50,5)):
2267 for g in (G, I, Ig, S, L, R):
2268 self.assertEqual(list(map(onearg, g(s))),
2269 [onearg(x) for x in g(s)])
2270 self.assertEqual(list(map(operator.pow, g(s), g(s))),
2271 [x**x for x in g(s)])
2272 self.assertRaises(TypeError, map, onearg, X(s))
2273 self.assertRaises(TypeError, map, onearg, N(s))
2274 self.assertRaises(ZeroDivisionError, list, map(onearg, E(s)))
2275
2276 def test_islice(self):
2277 for s in ("12345", "", range(1000), ('do', 1.2), range(2000,2200,5)):

Callers

nothing calls this directly

Calls 8

listClass · 0.85
oneargFunction · 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