code: def test_exceptions():
      def throws(v):
          assert False
  
      p1 = Promise()
      p1.then(throws)
      p1.do_resolve(5)
  
      p2 = Promise()
      p2.catch(throws)
      p2.do_reject(Exception())
  
      with raises(Exception) as excinfo:
          p2.get()
  
imports: from time import sleep
  from pytest import raises, fixture
  from threading import Event
  from promise import Promise, is_thenable, promisify, promise_for_dict
  from concurrent.futures import Future
  from threading import Thread
  from .utils import assert_exception
label_desc: Use image node_id 6 for calling a global function with example usage: test_exceptions() without return types