code: def test_errors(self):
      def error(args, regex=None):
          old_stderr = sys.stderr
          stderr = sys.stderr = StringIO()
          try:
              self.assertRaises(
                  SystemExit, parse_command_line, list(args)
              )
          finally:
              sys.stderr = old_stderr
          msg = stderr.getvalue().strip()
          self.assertTrue(msg)
          if regex:
              self.assertTrue(
                  re.search(regex, msg),
                  '"%s" does not match search "%s"' % (msg, regex),
              )
  
      error(["-1"], "Unknown compiler flag: -1")
      error(["-I"])
      error(["--version=-a"])
      error(["--version=--annotate=true"])
      error(["--working"])
      error(["--verbose=1"])
      error(["--cleanup"])
      error(
          ["--debug-disposal-code-wrong-name", "file3.pyx"],
          "Unknown debug flag: debug_disposal_code_wrong_name",
      )
      error(["--module-name", "foo.pyx"])
      error(["--module-name", "foo.bar"])
      error(
          ["--module-name", "foo.bar", "foo.pyx", "bar.pyx"],
          "Only one source file allowed when using --module-name",
      )
      error(
          ["--module-name", "foo.bar", "--timestamps", "foo.pyx"],
          "Cannot use --module-name with --timestamps",
      )
  
file_path: catboost/contrib/tools/cython/Cython/Compiler/Tests/TestCmdLine.py
imports: import sys
  import re
  from unittest import TestCase
  from ..None import Options
  from ..CmdLine import parse_command_line
label_desc: Use image node_id 9 for calling the CmdLineParserTest obj's underlying member method code with example usage: obj.test_errors() without return types