summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-04-30 20:44:24 (GMT)
committerGitHub <noreply@github.com>2020-04-30 20:44:24 (GMT)
commit3c7f9db85095952821f9d106dd874f75662ce7ec (patch)
tree74603d5653001e6fd7f4c02e2ddaed2efbdfb5a4 /Lib
parent2514a632fb7d37be24c2059d0e286d35600f9795 (diff)
downloadcpython-3c7f9db85095952821f9d106dd874f75662ce7ec.zip
cpython-3c7f9db85095952821f9d106dd874f75662ce7ec.tar.gz
cpython-3c7f9db85095952821f9d106dd874f75662ce7ec.tar.bz2
Revert "bpo-29587: Enable implicit exception chaining with gen.throw() (GH-19811)" (#19821)
This reverts commit 2514a632fb7d37be24c2059d0e286d35600f9795.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_generators.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
index 4d96f44..3e42bc6 100644
--- a/Lib/test/test_generators.py
+++ b/Lib/test/test_generators.py
@@ -316,23 +316,6 @@ class ExceptionTest(unittest.TestCase):
self.assertEqual(cm.exception.value.value, 2)
-class GeneratorThrowTest(unittest.TestCase):
-
- def test_exception_context_set(self):
- def f():
- try:
- raise KeyError('a')
- except Exception:
- yield
-
- gen = f()
- gen.send(None)
- with self.assertRaises(ValueError) as cm:
- gen.throw(ValueError)
- context = cm.exception.__context__
- self.assertEqual((type(context), context.args), (KeyError, ('a',)))
-
-
class YieldFromTests(unittest.TestCase):
def test_generator_gi_yieldfrom(self):
def a():