Exemple #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)
Exemple #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)
Exemple #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)