Exemplo n.º 1
0
    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)
Exemplo n.º 2
0
    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)
Exemplo n.º 3
0
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)
Exemplo n.º 4
0
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)