def test_reset_in_the_middle_of_ventilation(self):
        """Can not reset ventilator in the middle of ventilation"""
        for pool in [DummyPool(), ThreadPool(10)]:
            ventilator = ConcurrentVentilator(ventilate_fn=pool.ventilate,
                                              items_to_ventilate=[{'item': i} for i in range(100)],
                                              iterations=None)
            pool.start(IdentityWorker, ventilator=ventilator)

            # Resetting is supported only when the ventilator has finished
            with self.assertRaises(NotImplementedError):
                ventilator.reset()

            pool.stop()
            pool.join()
Can not reset ventilator in the middle of ventilation
petastorm/workers_pool/tests/test_ventilator.py