Python Debugging: Get Current Executed Function Name and Print Traceback
In Python, we can fail a test like this: def fail_the_test(error_msg): print(error_msg) sys.stdout.flush() sys.stdout.close() # this kills the process and make it return a non-zero code os.kill(os.getpid(), signal.SIGKILL) At …