diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-02-10 04:40:48 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-02-10 04:40:48 (GMT) |
commit | 7e3a91a5fc056f72c93f015bb9f4f22aef9e72fb (patch) | |
tree | 2d71aaeaad3d6536f20338811d806976577ec7bf /Lib/test/test_generators.py | |
parent | b0cb42dfdb422495fb0c3a4374f2fa010f56a5ac (diff) | |
download | cpython-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_generators.py')
-rw-r--r-- | Lib/test/test_generators.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py index b92d5ce..0389b48 100644 --- a/Lib/test/test_generators.py +++ b/Lib/test/test_generators.py @@ -245,11 +245,11 @@ class ExceptionTest(unittest.TestCase): yield with self.assertRaises(StopIteration), \ - self.assertWarnsRegex(PendingDeprecationWarning, "StopIteration"): + self.assertWarnsRegex(DeprecationWarning, "StopIteration"): next(gen()) - with self.assertRaisesRegex(PendingDeprecationWarning, + with self.assertRaisesRegex(DeprecationWarning, "generator .* raised StopIteration"), \ warnings.catch_warnings(): @@ -268,7 +268,7 @@ class ExceptionTest(unittest.TestCase): g = f() self.assertEqual(next(g), 1) - with self.assertWarnsRegex(PendingDeprecationWarning, "StopIteration"): + with self.assertWarnsRegex(DeprecationWarning, "StopIteration"): with self.assertRaises(StopIteration): next(g) |