Ejemplo n.º 1
0
 def test_color_greenforeground(self):
     txt = 'test'
     expected = '\x1b[0;32;40m' + txt + '\x1b[0m'
     result = colors.color(txt, 'GREEN')
     self.assertEqual(expected, result)
Ejemplo n.º 2
0
 def test_color_yellowforeground(self):
     txt = 'test'
     expected = '\x1b[0;33;40m' + txt + '\x1b[0m'
     result = colors.color(txt, 'YELLOW')
     self.assertEqual(expected, result)
Ejemplo n.º 3
0
 def test_color_redforeground(self):
     txt = 'test'
     expected = '\x1b[0;31;40m' + txt + '\x1b[0m'
     result = colors.color(txt, 'RED')
     self.assertEqual(expected, result)