示例#1
0
    def restart(self):
        self.cls()
        print "%s" % console.reset_color()
        self.cls()

        op = raw_input(console.colorize('green', 'Timing again? ') +
                       console.colorize('turquoise', '(y/n)') +
                       console.colorize('green', ': '))
        if op in ("y", "Y"):
            self.clocking()
        elif op in ("n", "N"):
            print console.reset_color()
            self.cls()
            sys.exit(EXIT)
        else:
            self.restart()
示例#2
0
    def restart(self):
        self.cls()
        print "%s" % console.reset_color()
        self.cls()

        op = raw_input(
            console.colorize('green', 'Timing again? ') +
            console.colorize('turquoise', '(y/n)') +
            console.colorize('green', ': '))
        if op in ("y", "Y"):
            self.clocking()
        elif op in ("n", "N"):
            print console.reset_color()
            self.cls()
            sys.exit(EXIT)
        else:
            self.restart()
示例#3
0
 def restart(self):
     self.cls()
     print "%s" % console.reset_color()
     self.cls()
     op = raw_input(console.colorize('green', 'Timing again? [the options remained the same] ') +
                    console.colorize('turquoise', '(y/n)') +
                    console.colorize('green', ': '))
     if op in ("y", "Y"):
         if self.times_fix:
             self.times = self.times_fix
         self.clocking()
     elif op in ("n", "N"):
         print console.reset_color()
         self.cls()
         sys.exit(EXIT)
     else:
         self.restart()
示例#4
0
 def restart(self):
     self.cls()
     print "%s" % console.reset_color()
     self.cls()
     op = raw_input(
         console.colorize("green", "Timing again? [the options remained the same] ")
         + console.colorize("turquoise", "(y/n)")
         + console.colorize("green", ": ")
     )
     if op in ("y", "Y"):
         if self.times_fix:
             self.times = self.times_fix
         self.clocking()
     elif op in ("n", "N"):
         print console.reset_color()
         self.cls()
         sys.exit(EXIT)
     else:
         self.restart()
示例#5
0
 def test_functions(self):
     self.assertEqual(console.reset_color(), console.codes['reset'])
     self.assertEqual(console.colorize('blue', 'text'),
                      console.codes['blue'] + 'text' + console.codes['reset'])
def test_console_functions():
    assert console.reset_color() == console.codes['reset']
    assert console.colorize('blue', 'text') == \
        console.codes['blue'] + 'text' + console.codes['reset']
示例#7
0
文件: test_util.py 项目: sol/pygments
 def test_functions(self):
     self.assertEqual(console.reset_color(), console.codes['reset'])
     self.assertEqual(console.colorize('blue', 'text'),
                      console.codes['blue'] + 'text' + console.codes['reset'])