Skip to content

Commit

Permalink
Use explicit version checking to determine which package to import
Browse files Browse the repository at this point in the history
  • Loading branch information
ceridwen committed Oct 19, 2017
1 parent c07fee2 commit 6e9effc
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions _pytest/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@
enum = None


try:
from inspect import signature, Parameter as Parameter
except ImportError: # pragma: no cover
from funcsigs import signature as signature, Parameter as Parameter


_PY3 = sys.version_info > (3, 0)
_PY2 = not _PY3


if _PY3:
from inspect import signature, Parameter as Parameter
else:
from funcsigs import signature, Parameter as Parameter


NoneType = type(None)
NOTSET = object()

Expand Down Expand Up @@ -91,9 +91,9 @@ def getfuncargnames(function, startindex=None, cls=None):
"""
Returns the names of a function's unbound arguments.
This should the names of all function arguments that:
This should return the names of all function arguments that:
* Aren't bound to an instance or type as in instance or class methods.
* Don't have default value.
* Don't have default values.
* Aren't bound with functools.partial.
* Aren't replaced with mocks.
Expand Down

0 comments on commit 6e9effc

Please sign in to comment.