def METHOD_NAME(self):
    """Function run in a thread for the tests"""
    value1, value2 = 0, 1
    future = concurrent.submitToQtMainThread(self._task, value1, value2=value2)
    wait([future], 3)
    self.assertTrue(future.done())
    self.assertEqual(future.result(1), (value1, value2))
    self.assertIsNone(future.exception(1))
    future = concurrent.submitToQtMainThread(self._taskWithException)
    wait([future], 3)
    self.assertTrue(future.done())
    with self.assertRaises(RuntimeError):
        future.result(1)
    self.assertIsInstance(future.exception(1), RuntimeError)