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

Method test_starmap

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

Source from the content-addressed store, hash-verified

1102 self.assertRaises(TypeError, next, map(onearg, [4], [5]))
1103
1104 def test_starmap(self):
1105 self.assertEqual(list(starmap(operator.pow, zip(range(3), range(1,7)))),
1106 [0**1, 1**2, 2**3])
1107 self.assertEqual(take(3, starmap(operator.pow, zip(count(), count(1)))),
1108 [0**1, 1**2, 2**3])
1109 self.assertEqual(list(starmap(operator.pow, [])), [])
1110 self.assertEqual(list(starmap(operator.pow, [iter([4,5])])), [4**5])
1111 self.assertRaises(TypeError, list, starmap(operator.pow, [None]))
1112 self.assertRaises(TypeError, starmap)
1113 self.assertRaises(TypeError, starmap, operator.pow, [(4,5)], 'extra')
1114 self.assertRaises(TypeError, next, starmap(10, [(4,5)]))
1115 self.assertRaises(ValueError, next, starmap(errfunc, [(4,5)]))
1116 self.assertRaises(TypeError, next, starmap(onearg, [(4,5)]))
1117
1118 @unittest.expectedFailure # TODO: RUSTPYTHON
1119 def test_islice(self):

Callers

nothing calls this directly

Calls 6

listClass · 0.85
takeFunction · 0.85
countFunction · 0.85
iterFunction · 0.85
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected