code: def test_unhandled_thread_exception_warning_error(
      pytester: Pytester,
  ) -> None:
      pytester.makepyfile(
          test_it="""
          import threading
          import pytest
  
          def test_it():
              def oops():
                  raise ValueError("Oops")
              t = threading.Thread(target=oops, name="MyThread")
              t.start()
              t.join()
  
          def test_2(): pass
          """
      )
      result = pytester.runpytest()
      assert result.ret == pytest.ExitCode.TESTS_FAILED
      assert result.parseoutcomes() == {"passed": 1, "failed": 1}
  
imports: import pytest
  from _pytest.pytester import Pytester
label_desc: Use image node_id 4 for calling a global function with example usage: test_unhandled_thread_exception_warning_error(pytester) without return types