def initial(self): return null_sink()
def test_closed_sink_raises_stop_iteration(self): sink = null_sink() sink.close() with self.assertRaises(StopIteration): sink.send(42)
def test_sent_items_are_sunk(self): sink = null_sink() for i in range(100): sink.send(100) sink.close()