summaryrefslogtreecommitdiff
path: root/src/_pytest/compat.py
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2020-10-02 19:47:35 -0700
committerGitHub <noreply@github.com>2020-10-02 19:47:35 -0700
commitac189885f6e12201c9c01b084601df9642402802 (patch)
tree7522d5b08f050bde8505bc05ac4fd4a44c9785ee /src/_pytest/compat.py
parent6ba13ed528754859933fa904d5c82c1ed6ff6978 (diff)
parent284fd45a086f3943b616fed1e608a3109d372c3b (diff)
downloadpytest-ac189885f6e12201c9c01b084601df9642402802.tar.gz
Merge pull request #7835 from asottile/py36_misc
py36+: miscellaneous (3, 6) cleanup
Diffstat (limited to 'src/_pytest/compat.py')
-rw-r--r--src/_pytest/compat.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/_pytest/compat.py b/src/_pytest/compat.py
index aa65d2e17..49b00c58e 100644
--- a/src/_pytest/compat.py
+++ b/src/_pytest/compat.py
@@ -87,9 +87,7 @@ def iscoroutinefunction(func: object) -> bool:
def is_async_function(func: object) -> bool:
"""Return True if the given function seems to be an async function or
an async generator."""
- return iscoroutinefunction(func) or (
- sys.version_info >= (3, 6) and inspect.isasyncgenfunction(func)
- )
+ return iscoroutinefunction(func) or inspect.isasyncgenfunction(func)
def getlocation(function, curdir: Optional[str] = None) -> str: