Exemplo n.º 1
0
 def test_long_title(self):
     talk = TalkStub('john doe', 
                     'a short talk with a name way longer than needed')
     actual = author_and_title(talk, '30,10,150')
     expected = '<tspan x="0" y="0">john doe: a short talk with a</tspan><tspan x="0" y="15.000000">name way longer than needed</tspan>'
     self.assertEqual(actual, expected, "Wrong formatting for a long title")
Exemplo n.º 2
0
 def test_very_long_title(self):
     talk = TalkStub('john doe', 
                     'a short talk with a name way longer than would absolutely be necessary')
     actual = author_and_title(talk, '30,10,150')
     expected = '<tspan x="0" y="0">john doe: a short talk with a</tspan><tspan x="0" y="15.000000">name way longer than would absolutely be necessary</tspan>'
     self.assertEqual(actual, expected, "Wrong formatting for a very long title")
Exemplo n.º 3
0
 def test_short_title(self):
     talk = TalkStub('john doe', 'a short talk')
     actual = author_and_title(talk, '20,10,150')
     expected = '<tspan x="0" y="0">john doe</tspan><tspan x="0" y="15.000000">a short talk</tspan>'
     self.assertEqual(actual, expected, "Wrong formatting for a short title")