summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2016-03-02 16:03:53 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2016-03-02 16:03:53 (GMT)
commita8ac8e336bcce0c890d171a019589f89f36dfdd5 (patch)
treec1617afd133d59dad30c493472e785ba1971ccd2 /Lib/test
parent578bc5b80b248f002373dd4d7cf29920fe18f34b (diff)
parent1bd030788d1092ba5d5d8b4e2fd75346ded69b3b (diff)
downloadcpython-a8ac8e336bcce0c890d171a019589f89f36dfdd5.zip
cpython-a8ac8e336bcce0c890d171a019589f89f36dfdd5.tar.gz
cpython-a8ac8e336bcce0c890d171a019589f89f36dfdd5.tar.bz2
Merge 3.5 (issue #26221)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_asyncio/test_futures.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_futures.py b/Lib/test/test_asyncio/test_futures.py
index 55fdff3..358b190 100644
--- a/Lib/test/test_asyncio/test_futures.py
+++ b/Lib/test/test_asyncio/test_futures.py
@@ -76,6 +76,10 @@ class FutureTests(test_utils.TestCase):
f = asyncio.Future(loop=self.loop)
self.assertRaises(asyncio.InvalidStateError, f.exception)
+ # StopIteration cannot be raised into a Future - CPython issue26221
+ self.assertRaisesRegex(TypeError, "StopIteration .* cannot be raised",
+ f.set_exception, StopIteration)
+
f.set_exception(exc)
self.assertFalse(f.cancelled())
self.assertTrue(f.done())