(self)
| 1391 | thread.join() |
| 1392 | |
| 1393 | def test_StopIteration(self): |
| 1394 | self.assertRaises(StopIteration, next, zip()) |
| 1395 | |
| 1396 | for f in (chain, cycle, zip, groupby): |
| 1397 | self.assertRaises(StopIteration, next, f([])) |
| 1398 | self.assertRaises(StopIteration, next, f(StopNow())) |
| 1399 | |
| 1400 | self.assertRaises(StopIteration, next, islice([], None)) |
| 1401 | self.assertRaises(StopIteration, next, islice(StopNow(), None)) |
| 1402 | |
| 1403 | p, q = tee([]) |
| 1404 | self.assertRaises(StopIteration, next, p) |
| 1405 | self.assertRaises(StopIteration, next, q) |
| 1406 | p, q = tee(StopNow()) |
| 1407 | self.assertRaises(StopIteration, next, p) |
| 1408 | self.assertRaises(StopIteration, next, q) |
| 1409 | |
| 1410 | self.assertRaises(StopIteration, next, repeat(None, 0)) |
| 1411 | |
| 1412 | for f in (filter, filterfalse, map, takewhile, dropwhile, starmap): |
| 1413 | self.assertRaises(StopIteration, next, f(lambda x:x, [])) |
| 1414 | self.assertRaises(StopIteration, next, f(lambda x:x, StopNow())) |
| 1415 | |
| 1416 | @support.cpython_only |
| 1417 | def test_combinations_result_gc(self): |
nothing calls this directly
no test coverage detected