code: def test_basic_testitem_events(self, pytester: Pytester) -> None:
      tfile = pytester.makepyfile(
          """
              def test_one():
                  pass
              def test_one_one():
                  assert 0
              def test_other():
                  raise ValueError(23)
              class TestClass(object):
                  def test_two(self, someargs):
                      pass
          """
      )
      reprec = pytester.inline_run(tfile)
      passed, skipped, failed = reprec.listoutcomes()
      assert len(skipped) == 0
      assert len(passed) == 1
      assert len(failed) == 3
  
      def end(x):
          return x.nodeid.split("::")[-1]
  
      assert end(failed[0]) == "test_one_one"
      assert end(failed[1]) == "test_other"
      itemstarted = reprec.getcalls("pytest_itemcollected")
      assert len(itemstarted) == 4
  
imports: import pytest
  from _pytest.config import ExitCode
  from _pytest.monkeypatch import MonkeyPatch
  from _pytest.pytester import Pytester
label_desc: Use image node_id 1 for calling the SessionTests obj's underlying member method code with example usage: obj.test_basic_testitem_events(pytester) and returns: x