From 9263f30c888ee20742afe2dd727beaa8e6e181bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Tue, 13 May 2014 21:05:53 +0200 Subject: [PATCH] use py.builtin.callable instead of raw callable in _pytest/runner.py This is consistent with how callable() is called from the rest of pytest code (see _pytest/nose.py & _pytest/python.py) plus, as a nice side-effect, it makes pytest work correctly on Python 3.1. --HG-- branch : python 3.1 fix --- _pytest/runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pytest/runner.py b/_pytest/runner.py index 8c82a3294..428e6ec42 100644 --- a/_pytest/runner.py +++ b/_pytest/runner.py @@ -328,7 +328,7 @@ class SetupState(object): is called at the end of teardown_all(). """ assert colitem and not isinstance(colitem, tuple) - assert callable(finalizer) + assert py.builtin.callable(finalizer) #assert colitem in self.stack # some unit tests don't setup stack :/ self._finalizers.setdefault(colitem, []).append(finalizer)