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()
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()
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()
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()
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']