code: def test_relpath_errors(self):
      # Check relpath() raises friendly TypeErrors.
      with warnings_helper.check_warnings(
          ("", (BytesWarning, DeprecationWarning)), quiet=True
      ):
          errmsg = "Can't mix strings and bytes in path components"
          with self.assertRaisesRegex(TypeError, errmsg):
              self.pathmodule.relpath(b"bytes", "str")
          with self.assertRaisesRegex(TypeError, errmsg):
              self.pathmodule.relpath("str", b"bytes")
          with self.assertRaisesRegex(TypeError, "int"):
              self.pathmodule.relpath(42, "str")
          with self.assertRaisesRegex(TypeError, "int"):
              self.pathmodule.relpath("str", 42)
          with self.assertRaisesRegex(TypeError, "bytearray"):
              self.pathmodule.relpath(
                  bytearray(b"foo"), bytearray(b"bar")
              )
  
imports: import genericpath
  import os
  import sys
  import unittest
  import warnings
  from test.support import is_emscripten
  from test.support import os_helper
  from test.support import warnings_helper
  from test.support.script_helper import assert_python_ok
  from test.support.os_helper import FakePath
label_desc: Use image node_id 12 for calling the CommonTest obj's underlying member method code with example usage: obj.test_relpath_errors() without return types