docstr: The @unittest.skip decorator calls functools.wraps(self._testcase)
  The call to functools.wraps() fails unless self._testcase
  has a __name__ attribute. This is usually automatically supplied
  if the test is a function or method, but we need to add manually
  here.
  
  See issue #1169
docstr_tok: ["The","@","unittest.skip","decorator","calls","functools.wraps","(","self._testcase",")","The","call","to","functools.wraps","(",")","fails","unless","self._testcase","has","a","__name__","attribute",".","This","is","usually","automatically","supplied","if","the","test","is","a","function","or","method",",","but","we","need","to","add","manually","here",".","See","issue","#","1169"]
code: def _fix_unittest_skip_decorator(self):
      """
      The @unittest.skip decorator calls functools.wraps(self._testcase)
      The call to functools.wraps() fails unless self._testcase
      has a __name__ attribute. This is usually automatically supplied
      if the test is a function or method, but we need to add manually
      here.
  
      See issue #1169
      """
      if sys.version_info[0] == 2:
          setattr(self._testcase, "__name__", self.name)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import sys
  import traceback
  import _pytest._code
  import pytest
  from _pytest.compat import getimfunc
  from _pytest.config import hookimpl
  from _pytest.outcomes import fail
  from _pytest.outcomes import skip
  from _pytest.outcomes import xfail
  from _pytest.python import Class
  from _pytest.python import Function
label_desc: Use image node_id 2 for calling the TestCaseFunction obj's underlying member method code with example usage: obj._fix_unittest_skip_decorator() without return types