def test_in_game(self): print """admin.say "%s | %s" all """ % (ljust('<[({ hello world ! })]>', 48), ljust('<[({ hello world ! })]>', 48)) print """admin.say "%s | %s" all """ % (center('<[({ hello world ! })]>', 48), center('<[({ hello world ! })]>', 48)) print """admin.say "%s | %s" all """ % (rjust('<[({ hello world ! })]>', 48), rjust('<[({ hello world ! })]>', 48))
def test_rjust(self): self.assertAlmostEqual(50, width(rjust('<[({ hello world ! })]>', 50)), delta=2) self.assertAlmostEqual(50, width(rjust(' ', 50)), delta=2) self.assertAlmostEqual(50, width(rjust('fqs 654651 sq1fqs ]@ /o', 50)), delta=2)