@@ -675,20 +675,21 @@ def _of_interest(x): # noqa
675675 co_firstlineno = get_code_first_line (m )
676676 if cls is not None :
677677 if isinstance (cls .__dict__ [m_name ], (staticmethod , classmethod )):
678- # skip it
679- continue
680- # partialize the function to get one without the 'self' argument
681- new_m = functools .partial (m , cls ())
682- # remember the class
683- setattr (new_m , _HOST_CLS_ATTR , cls )
684- # we have to recopy all metadata concerning the case function
685- new_m .__name__ = m .__name__
686- copy_case_info (m , new_m )
687- copy_pytest_marks (m , new_m , override = True )
688- # also recopy all marks from the holding class to the function
689- copy_pytest_marks (cls , new_m , override = False )
690- m = new_m
691- del new_m
678+ # nothing to do: no need to partialize a 'self' argument
679+ pass
680+ else :
681+ # partialize the function to get one without the 'self' argument
682+ new_m = functools .partial (m , cls ())
683+ # remember the class
684+ setattr (new_m , _HOST_CLS_ATTR , cls )
685+ # we have to recopy all metadata concerning the case function
686+ new_m .__name__ = m .__name__
687+ copy_case_info (m , new_m )
688+ copy_pytest_marks (m , new_m , override = True )
689+ # also recopy all marks from the holding class to the function
690+ copy_pytest_marks (cls , new_m , override = False )
691+ m = new_m
692+ del new_m
692693
693694 if _case_param_factory is None :
694695 # Nominal usage: put the case in the dictionary
0 commit comments