diff options
author | Yury Selivanov <yury@magic.io> | 2016-11-08 20:15:42 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-11-08 20:15:42 (GMT) |
commit | 0ee446c8941cbc169230fc098bec5dfb9a56c0b9 (patch) | |
tree | 45820eba8b655702a26c36fe82ad929f92da9ef6 /Lib | |
parent | 64d84c60e28dc4d9d08286e290e7bab26526bb6c (diff) | |
parent | 2edd8a1e2cd22f8ba46e108ff213bec8c5f86459 (diff) | |
download | cpython-0ee446c8941cbc169230fc098bec5dfb9a56c0b9.zip cpython-0ee446c8941cbc169230fc098bec5dfb9a56c0b9.tar.gz cpython-0ee446c8941cbc169230fc098bec5dfb9a56c0b9.tar.bz2 |
Merge 3.6 (issue #27243)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_coroutines.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/test/test_coroutines.py b/Lib/test/test_coroutines.py index 50e439a..78439a2 100644 --- a/Lib/test/test_coroutines.py +++ b/Lib/test/test_coroutines.py @@ -1398,7 +1398,7 @@ class CoroutineTest(unittest.TestCase): buffer = [] async def test1(): - with self.assertWarnsRegex(PendingDeprecationWarning, "legacy"): + with self.assertWarnsRegex(DeprecationWarning, "legacy"): async for i1, i2 in AsyncIter(): buffer.append(i1 + i2) @@ -1412,7 +1412,7 @@ class CoroutineTest(unittest.TestCase): buffer = [] async def test2(): nonlocal buffer - with self.assertWarnsRegex(PendingDeprecationWarning, "legacy"): + with self.assertWarnsRegex(DeprecationWarning, "legacy"): async for i in AsyncIter(): buffer.append(i[0]) if i[0] == 20: @@ -1431,7 +1431,7 @@ class CoroutineTest(unittest.TestCase): buffer = [] async def test3(): nonlocal buffer - with self.assertWarnsRegex(PendingDeprecationWarning, "legacy"): + with self.assertWarnsRegex(DeprecationWarning, "legacy"): async for i in AsyncIter(): if i[0] > 20: continue @@ -1514,7 +1514,7 @@ class CoroutineTest(unittest.TestCase): return 123 async def foo(): - with self.assertWarnsRegex(PendingDeprecationWarning, "legacy"): + with self.assertWarnsRegex(DeprecationWarning, "legacy"): async for i in I(): print('never going to happen') @@ -1623,7 +1623,7 @@ class CoroutineTest(unittest.TestCase): 1/0 async def foo(): nonlocal CNT - with self.assertWarnsRegex(PendingDeprecationWarning, "legacy"): + with self.assertWarnsRegex(DeprecationWarning, "legacy"): async for i in AI(): CNT += 1 CNT += 10 @@ -1650,7 +1650,7 @@ class CoroutineTest(unittest.TestCase): self.assertEqual(CNT, 0) def test_for_9(self): - # Test that PendingDeprecationWarning can safely be converted into + # Test that DeprecationWarning can safely be converted into # an exception (__aiter__ should not have a chance to raise # a ZeroDivisionError.) class AI: @@ -1660,13 +1660,13 @@ class CoroutineTest(unittest.TestCase): async for i in AI(): pass - with self.assertRaises(PendingDeprecationWarning): + with self.assertRaises(DeprecationWarning): with warnings.catch_warnings(): warnings.simplefilter("error") run_async(foo()) def test_for_10(self): - # Test that PendingDeprecationWarning can safely be converted into + # Test that DeprecationWarning can safely be converted into # an exception. class AI: async def __aiter__(self): @@ -1675,7 +1675,7 @@ class CoroutineTest(unittest.TestCase): async for i in AI(): pass - with self.assertRaises(PendingDeprecationWarning): + with self.assertRaises(DeprecationWarning): with warnings.catch_warnings(): warnings.simplefilter("error") run_async(foo()) |