def test_set_exception(self):
        f = Future()
        exc = []

        def set_exception():
            try:
                {}["invalid_key"]
            except __HOLE__ as e:
                exc.append(sys.exc_info())
                f.set_exception(e, sys.exc_info()[2])

        Thread(target=set_exception).start()
        exception = f.exception()
        traceback = f.traceback()
        exc = exc[0]
        self.assertEqual(exc[1], exception)
        self.assertEqual(exc[2], traceback)
dataset/ETHPy150Open hazelcast/hazelcast-python-client/tests/future_test.py/FutureTest.test_set_exception