diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-08-22 15:27:38 +0200 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-08-30 08:06:15 +0200 |
commit | b33d76cf94dc7e87d879cbff422e6c0d5a5c8bcf (patch) | |
tree | d830215c4b262362f0ea51df885990eb71e7396f /tests/functional/y/yield_inside_async_function.py | |
parent | a70a1990d6881d3f131d040192aba438e508fb81 (diff) | |
download | pylint-git-b33d76cf94dc7e87d879cbff422e6c0d5a5c8bcf.tar.gz |
Remove async test for python 3.5 or lesser
Diffstat (limited to 'tests/functional/y/yield_inside_async_function.py')
-rw-r--r-- | tests/functional/y/yield_inside_async_function.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/functional/y/yield_inside_async_function.py b/tests/functional/y/yield_inside_async_function.py index a0f52e61f..9f293b47d 100644 --- a/tests/functional/y/yield_inside_async_function.py +++ b/tests/functional/y/yield_inside_async_function.py @@ -1,12 +1,16 @@ """Test that `yield` or `yield from` can't be used inside an async function."""
# pylint: disable=missing-docstring, unused-variable
-async def good_coro():
+async def good():
def _inner():
yield 42
yield from [1, 2, 3]
-
-async def bad_coro():
+async def good_two():
+ # Starting from python 3.6 it's possible to yield inside async
+ # https://www.python.org/dev/peps/pep-0525/
yield 42
+
+
+async def bad():
yield from [1, 2, 3] # [yield-inside-async-function]
|