Ejemplo n.º 1
0
class TestDiscoball(unittest.TestCase):
  def setUp(self):
    self.dball = Discoball([re.compile('\+\w+')], "one", "all")
  def testNoMatch(self):
    line = 'no match'
    self.assertEqual(line, self.dball.colorize(line))
  def testSimpleMatch(self):
    line = '+tag'
    expected = str(underline(blue(line)))
    self.assertEqual(expected, self.dball.colorize(line))
Ejemplo n.º 2
0
 def setUp(self):
   self.dball = Discoball([re.compile('\+\w+')], "one", "all")