diff --git a/py/test/testing/test_funcargs.py b/py/test/testing/test_funcargs.py index 05e18c3b2..efc6bf489 100644 --- a/py/test/testing/test_funcargs.py +++ b/py/test/testing/test_funcargs.py @@ -348,8 +348,12 @@ class TestGenfuncFunctional: def test_method(self, metafunc): assert metafunc.config == py.test.config assert metafunc.module.__name__ == __name__ + if py.std.sys.version_info > (3, 0): + unbound = TestClass.test_method + else: + unbound = TestClass.test_method.im_func # XXX actually have an unbound test function here? - assert metafunc.function == TestClass.test_method.im_func + assert metafunc.function == unbound assert metafunc.cls == TestClass """) result = testdir.runpytest(p, "-v")