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

Method test_zip

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

Source from the content-addressed store, hash-verified

2293 self.assertRaises(ZeroDivisionError, list, filterfalse(isEven, E(s)))
2294
2295 def test_zip(self):
2296 for s in ("123", "", range(1000), ('do', 1.2), range(2000,2200,5)):
2297 for g in (G, I, Ig, S, L, R):
2298 self.assertEqual(list(zip(g(s))), lzip(g(s)))
2299 self.assertEqual(list(zip(g(s), g(s))), lzip(g(s), g(s)))
2300 self.assertRaises(TypeError, zip, X(s))
2301 self.assertRaises(TypeError, zip, N(s))
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)):

Callers

nothing calls this directly

Calls 8

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