summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_futures.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_asyncio/test_futures.py')
-rw-r--r--Lib/test/test_asyncio/test_futures.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_futures.py b/Lib/test/test_asyncio/test_futures.py
index d3a7412..8a6976b 100644
--- a/Lib/test/test_asyncio/test_futures.py
+++ b/Lib/test/test_asyncio/test_futures.py
@@ -79,6 +79,11 @@ class FutureTests(unittest.TestCase):
self.assertRaises(asyncio.InvalidStateError, f.set_exception, None)
self.assertFalse(f.cancel())
+ def test_exception_class(self):
+ f = asyncio.Future(loop=self.loop)
+ f.set_exception(RuntimeError)
+ self.assertIsInstance(f.exception(), RuntimeError)
+
def test_yield_from_twice(self):
f = asyncio.Future(loop=self.loop)