Commits

Ronny Pfannschmidt committed efc2693

test call_optional not calling non-callable functions

  • Participants
  • Parent commits 593347f

Comments (0)

Files changed (1)

File testing/test_nose.py

     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