docstr: Injects a hidden auto-use fixture to invoke setUpClass/setup_method and corresponding
  teardown functions (#517)
docstr_tok: ["Injects","a","hidden","auto-use","fixture","to","invoke","setUpClass\/setup_method","and","corresponding","teardown","functions","(","#","517",")"]
code: def _inject_setup_teardown_fixtures(self, cls):
      """Injects a hidden auto-use fixture to invoke setUpClass/setup_method and corresponding
      teardown functions (#517)"""
      class_fixture = _make_xunit_fixture(
          cls,
          "setUpClass",
          "tearDownClass",
          scope="class",
          pass_self=False,
      )
      if class_fixture:
          cls.__pytest_class_setup = class_fixture
  
      method_fixture = _make_xunit_fixture(
          cls,
          "setup_method",
          "teardown_method",
          scope="function",
          pass_self=True,
      )
      if method_fixture:
          cls.__pytest_method_setup = method_fixture
  
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 UnitTestCase obj's underlying member method code with example usage: obj._inject_setup_teardown_fixtures(cls) without return types