'Once the CountingStream has stopped iterating, the index should not
increase anymore (the internal state should not be allowed to change)'

def test_repeated(self):

    s = misc.CountingStream(iter([]))
    self.assertIsNone(next(s, None))
    self.assertEqual(s.index, 0)
    self.assertIsNone(next(s, None))
    self.assertEqual(s.index, 0)
