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

Method test_ziplongest

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

Source from the content-addressed store, hash-verified

2302 self.assertRaises(ZeroDivisionError, list, zip(E(s)))
2303
2304 def test_ziplongest(self):
2305 for s in ("123", "", range(1000), ('do', 1.2), range(2000,2200,5)):
2306 for g in (G, I, Ig, S, L, R):
2307 self.assertEqual(list(zip_longest(g(s))), list(zip(g(s))))
2308 self.assertEqual(list(zip_longest(g(s), g(s))), list(zip(g(s), g(s))))
2309 self.assertRaises(TypeError, zip_longest, X(s))
2310 self.assertRaises(TypeError, zip_longest, N(s))
2311 self.assertRaises(ZeroDivisionError, list, zip_longest(E(s)))
2312
2313 def test_map(self):
2314 for s in (range(10), range(0), range(100), (7,11), range(20,50,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