def test_read_lines(self): io = IterIO(iter(['he\n\nllo', '\nworl\nd'])) assert io.readlines() == ['he\n', '\n', 'llo\n', 'worl\n', 'd']