def _inject_setup_class_fixture(self):
setup_class = _get_non_fixture_func(self.obj, "<STR_LIT>")<EOL>teardown_class = getattr(self.obj, "<STR_LIT>", None)<EOL>if setup_class is None and teardown_class is None:<EOL><INDENT>return<EOL><DEDENT>@fixtures.fixture(autouse=True, scope="<STR_LIT:class>")<EOL>def xunit_setup_class_fixture(cls):<EOL><INDENT>if setup_class is not None:<EOL><INDENT>func = getimfunc(setup_class)<EOL>_call_with_optional_argument(func, self.obj)<EOL><DEDENT>yield<EOL>if teardown_class is not None:<EOL><INDENT>func = getimfunc(teardown_class)<EOL>_call_with_optional_argument(func, self.obj)<EOL><DEDENT><DEDENT>self.obj.__pytest_setup_class = xunit_setup_class_fixture<EOL>
Injects a hidden autouse, class scoped fixture into the collected class object
        that invokes setup_class/teardown_class if either or both are available.

        Using a fixture to invoke this methods ensures we play nicely and unsurprisingly with
        other fixtures (#517).