summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_with.py
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-02-10 04:40:48 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-02-10 04:40:48 (GMT)
commit7e3a91a5fc056f72c93f015bb9f4f22aef9e72fb (patch)
tree2d71aaeaad3d6536f20338811d806976577ec7bf /Lib/test/test_with.py
parentb0cb42dfdb422495fb0c3a4374f2fa010f56a5ac (diff)
downloadcpython-7e3a91a5fc056f72c93f015bb9f4f22aef9e72fb.zip
cpython-7e3a91a5fc056f72c93f015bb9f4f22aef9e72fb.tar.gz
cpython-7e3a91a5fc056f72c93f015bb9f4f22aef9e72fb.tar.bz2
Issue #26136: Upgrade the generator_stop warning to DeprecationWarning
Patch by Anish Shah.
Diffstat (limited to 'Lib/test/test_with.py')
-rw-r--r--Lib/test/test_with.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_with.py b/Lib/test/test_with.py
index e8d789b..3815062 100644
--- a/Lib/test/test_with.py
+++ b/Lib/test/test_with.py
@@ -454,7 +454,7 @@ class ExceptionalTestCase(ContextmanagerAssertionMixin, unittest.TestCase):
with cm():
raise StopIteration("from with")
- with self.assertWarnsRegex(PendingDeprecationWarning, "StopIteration"):
+ with self.assertWarnsRegex(DeprecationWarning, "StopIteration"):
self.assertRaises(StopIteration, shouldThrow)
def testRaisedStopIteration2(self):
@@ -482,7 +482,7 @@ class ExceptionalTestCase(ContextmanagerAssertionMixin, unittest.TestCase):
with cm():
raise next(iter([]))
- with self.assertWarnsRegex(PendingDeprecationWarning, "StopIteration"):
+ with self.assertWarnsRegex(DeprecationWarning, "StopIteration"):
self.assertRaises(StopIteration, shouldThrow)
def testRaisedGeneratorExit1(self):