Esempio n. 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()
Esempio n. 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()
Esempio n. 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()
Esempio n. 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()
Esempio n. 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'])
Esempio n. 6
0
def test_console_functions():
    assert console.reset_color() == console.codes['reset']
    assert console.colorize('blue', 'text') == \
        console.codes['blue'] + 'text' + console.codes['reset']
Esempio n. 7
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'])