code: def test_error_message(self):
      compile(b"# -*- coding: iso-8859-15 -*-\n", "dummy", "exec")
      compile(b"\xef\xbb\xbf\n", "dummy", "exec")
      compile(b"\xef\xbb\xbf# -*- coding: utf-8 -*-\n", "dummy", "exec")
      with self.assertRaisesRegex(SyntaxError, "fake"):
          compile(b"# -*- coding: fake -*-\n", "dummy", "exec")
      with self.assertRaisesRegex(SyntaxError, "iso-8859-15"):
          compile(
              b"\xef\xbb\xbf# -*- coding: iso-8859-15 -*-\n",
              "dummy",
              "exec",
          )
      with self.assertRaisesRegex(SyntaxError, "BOM"):
          compile(
              b"\xef\xbb\xbf# -*- coding: iso-8859-15 -*-\n",
              "dummy",
              "exec",
          )
      with self.assertRaisesRegex(SyntaxError, "fake"):
          compile(
              b"\xef\xbb\xbf# -*- coding: fake -*-\n", "dummy", "exec"
          )
      with self.assertRaisesRegex(SyntaxError, "BOM"):
          compile(
              b"\xef\xbb\xbf# -*- coding: fake -*-\n", "dummy", "exec"
          )
  
imports: import unittest
  from test.support import script_helper, captured_stdout, requires_subprocess, requires_resource
  from test.support.os_helper import TESTFN, unlink, rmtree
  from test.support.import_helper import unload
  import importlib
  import os
  import sys
  import subprocess
  import tempfile
label_desc: Use image node_id 8 for calling the MiscSourceEncodingTest obj's underlying member method code with example usage: obj.test_error_message() without return types