def setUp(self): segments = [(ByteIStream(b"*******abcde**************"), 7, 5), (ByteIStream(b"******fghi****************"), 6, 4), (ByteIStream(b"jklmn*********************"), 0, 5), (ByteIStream(b"*****************opqrstuvw"), 17, 9), (ByteIStream(b"*******************xy*****"), 19, 2), (ByteIStream(b"z"), 0, 1)] self.composite = Composite(segments)
def setUp(self): segments = [ (ByteIStream(b"*******abcde**************"), 7, 5), (ByteIStream(b"******fghi****************"), 6, 4), (ByteIStream(b"jklmn*********************"), 0, 5), (ByteIStream(b"*****************opqrstuvw"), 17, 9), (ByteIStream(b"*******************xy*****"), 19, 2), (ByteIStream(b"z"), 0, 1) ] self.composite = Composite(segments)
class CompositeTestCase(TestCase): def setUp(self): segments = [ (ByteIStream(b"*******abcde**************"), 7, 5), (ByteIStream(b"******fghi****************"), 6, 4), (ByteIStream(b"jklmn*********************"), 0, 5), (ByteIStream(b"*****************opqrstuvw"), 17, 9), (ByteIStream(b"*******************xy*****"), 19, 2), (ByteIStream(b"z"), 0, 1) ] self.composite = Composite(segments) # end def setUp def test_list(self): ae = self.assertEqual ae(self.composite.list(), [StreamInfo(0)]) # end def test_list def test_open(self): ae = self.assertEqual ae(self.composite.open(), self.composite.stream)
class CompositeTestCase(TestCase): def setUp(self): segments = [(ByteIStream(b"*******abcde**************"), 7, 5), (ByteIStream(b"******fghi****************"), 6, 4), (ByteIStream(b"jklmn*********************"), 0, 5), (ByteIStream(b"*****************opqrstuvw"), 17, 9), (ByteIStream(b"*******************xy*****"), 19, 2), (ByteIStream(b"z"), 0, 1)] self.composite = Composite(segments) # end def setUp def test_list(self): ae = self.assertEqual ae(self.composite.list(), [StreamInfo(0)]) # end def test_list def test_open(self): ae = self.assertEqual ae(self.composite.open(), self.composite.stream)