From 04754f6748ed93b3103a4fb8e7cbec746c06ef72 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Mon, 5 Nov 2012 21:17:58 +0100 Subject: [PATCH] test call_optional not calling non-callable functions --- testing/test_nose.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/testing/test_nose.py b/testing/test_nose.py index f67f6cb73..0fe420f3f 100644 --- a/testing/test_nose.py +++ b/testing/test_nose.py @@ -35,6 +35,12 @@ def test_setup_func_with_setup_decorator(): assert not l +def test_setup_func_not_callable(): + from _pytest.nose import call_optional + class A: + f = 1 + call_optional(A(), "f") + def test_nose_setup_func(testdir): p = testdir.makepyfile(""" from nose.tools import with_setup