title: Python: assert does not print out error message
body: <p>I am using the assertion in a multithreaded environment to help me catch early bugs. But it turns out that when assertion failed, python3.7 just terminates silently without printing the error message that I want to see. Thanks for helping in advance.</p>
  
  <p>Here is the sample code:</p>
  
  <pre><code>from concurrent.futures import ThreadPoolExecutor
  import threading
  import random
  from time import sleep
  def task():
      assert False, "no assertion output, why?"
      print("Executing our Task")
      sleep(5)
      result = 0
      i = 0
      for i in range(10):
          result = result + i
      print("I: {}".format(result))
      print("Task Executed {}".format(threading.current_thread()))
  
  if __name__ == '__main__':
      executor = ThreadPoolExecutor(max_workers=3)
      task1 = executor.submit(task,1)
      task2 = executor.submit(task,1)
      #task(), directly calling and the assertion failure message will be printed out.
  </code></pre>
  
  <p>I ran it using the command <code>python3.7 test.py</code></p>
  
  <p>I think I used python assertion in a wrong way because I assume it to be the assert function in c++. If I change the assertion to throwing an exception, the above code does not print too. Am I supposed to catch the exception?</p>
  
  <p>BTW, directly calling it, and the assertion failure message will be shown though.</p>