Beispiel #1
0
    def tear_down():
        if current_thread() != SystemHandler.__locker_thread:
            raise ErrorWithFeedback(
                "Cannot tear down the testing process from the other thread")

        with SystemHandler.__lock:
            if not SystemHandler.__locked:
                raise ErrorWithFeedback(
                    "Cannot tear down the testing process more than once")
            SystemHandler.__locked = False
            SystemHandler.__locker_thread = None

        OutputHandler.revert_stdout()
        InputHandler.revert_input()
        ExitHandler.revert_exit()
 def tear_down():
     OutputHandler.revert_stdout()
     InputHandler.revert_input()
     ExitHandler.revert_exit()