From 51e32cf7cc2906f24330081bc097cd80ba0acf14 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sun, 26 Aug 2018 10:33:17 -0300 Subject: [PATCH] Remove Python 2.6 specific warning --- src/_pytest/python.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/_pytest/python.py b/src/_pytest/python.py index f175394a8..a4c3c3252 100644 --- a/src/_pytest/python.py +++ b/src/_pytest/python.py @@ -349,11 +349,6 @@ class PyCollector(PyobjMixin, nodes.Collector): if isinstance(obj, staticmethod): # static methods need to be unwrapped obj = safe_getattr(obj, "__func__", False) - if obj is False: - # Python 2.6 wraps in a different way that we won't try to handle - msg = "cannot collect static method %r because it is not a function" - self.warn(code="C2", message=msg % name) - return False return ( safe_getattr(obj, "__call__", False) and fixtures.getfixturemarker(obj) is None