From 9c19728d2ba9da18b7face1e3b97fe3012ecfbb2 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Wed, 16 Sep 2015 06:45:51 -0400 Subject: [PATCH] Fix checking for args --- _pytest/python.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pytest/python.py b/_pytest/python.py index 6f811c296..ce3ae471f 100644 --- a/_pytest/python.py +++ b/_pytest/python.py @@ -46,7 +46,7 @@ if hasattr(inspect, 'signature'): return str(inspect.signature(func)) else: def _has_positional_arg(func): - return inspect.getargspec(func)[0] is not None + return bool(inspect.getargspec(func).args) def _format_args(func): return inspect.formatargspec(*inspect.getargspec(func))