Exemplo n.º 1
0
    def test_add_two_caption_lists(self):
        newcaps = self.caps + CaptionList([4], layout_info=None)
        self.assertTrue(isinstance(newcaps, CaptionList))
        self.assertTrue(newcaps.layout_info == self.layout_info)

        newcaps = self.caps + CaptionList([4], layout_info=self.layout_info)
        self.assertTrue(isinstance(newcaps, CaptionList))
        self.assertTrue(newcaps.layout_info == self.layout_info)

        with self.assertRaises(ValueError):
            newcaps = self.caps + CaptionList([4], layout_info="Other Layout")
Exemplo n.º 2
0
    def test_add_two_caption_lists(self):
        newcaps = self.caps + CaptionList([4], layout_info=None)

        assert isinstance(newcaps, CaptionList)
        assert newcaps.layout_info == self.layout_info

        newcaps = self.caps + CaptionList([4], layout_info=self.layout_info)

        assert isinstance(newcaps, CaptionList)
        assert newcaps.layout_info == self.layout_info

        with pytest.raises(ValueError):
            newcaps = self.caps + CaptionList([4], layout_info="Other Layout")
Exemplo n.º 3
0
 def setUp(self):
     self.layout_info = "My Layout"
     self.caps = CaptionList([1, 2, 3], layout_info=self.layout_info)