Beispiel #1
0
    def test_grey_without_colored_on(self):
        display = Display()
        display.colored = False

        self.assertEqual(display.grey('foobar'), 'foobar')
Beispiel #2
0
    def test_grey_with_colored_on(self):
        display = Display()
        display.colored = True

        self.assertEqual(display.grey('foobar'), colored('foobar', 'white'))
Beispiel #3
0
    def test_red_with_colored_on(self):
        display = Display()
        display.colored = True

        self.assertEqual(display.red('foobar'), colored('foobar', 'red'))
Beispiel #4
0
    def test_yellow_without_colored_on(self):
        display = Display()
        display.colored = False

        self.assertEqual(display.yellow('foobar'), 'foobar')
Beispiel #5
0
    def test_yellow_with_colored_on(self):
        display = Display()
        display.colored = True

        self.assertEqual(display.yellow('foobar'), colored('foobar', 'yellow'))
Beispiel #6
0
    def test_cyan_with_colored_on(self):
        display = Display()
        display.colored = True

        self.assertEqual(display.cyan('foobar'), colored('foobar', 'cyan'))