def set_up(): with SystemHandler.__lock: if SystemHandler.__locked: raise ErrorWithFeedback( "Cannot start the testing process more than once") SystemHandler.__locked = True SystemHandler.__locker_thread = current_thread() OutputHandler.replace_stdout() InputHandler.replace_input() ExitHandler.replace_exit()
def set_up(): OutputHandler.replace_stdout() InputHandler.replace_input() ExitHandler.replace_exit()