code: def test_class_setup(pytester: Pytester) -> None:
      reprec = pytester.inline_runsource(
          """
          class TestSimpleClassSetup(object):
              clslevel = []
              def setup_class(cls):
                  cls.clslevel.append(23)
  
              def teardown_class(cls):
                  cls.clslevel.pop()
  
              def test_classlevel(self):
                  assert self.clslevel[0] == 23
  
          class TestInheritedClassSetupStillWorks(TestSimpleClassSetup):
              def test_classlevel_anothertime(self):
                  assert self.clslevel == [23]
  
          def test_cleanup():
              assert not TestSimpleClassSetup.clslevel
              assert not TestInheritedClassSetupStillWorks.clslevel
      """
      )
      reprec.assertoutcome(passed=1 + 2 + 1)
  
file_path: pytest/testing/test_runner_xunit.py
imports: from typing import List
  import pytest
  from _pytest.pytester import Pytester
label_desc: Use image node_id 4 for calling a global function with example usage: test_class_setup(pytester) without return types