code: def test_issue7820(self):
      # Ensure that check_bom() restores all bytes in the right order if
      # check_bom() fails in pydebug mode: a buffer starts with the first
      # byte of a valid BOM, but next bytes are different
  
      # one byte in common with the UTF-16-LE BOM
      self.assertRaises(SyntaxError, eval, b"\xff\x20")
  
      # one byte in common with the UTF-8 BOM
      self.assertRaises(SyntaxError, eval, b"\xef\x20")
  
      # two bytes in common with the UTF-8 BOM
      self.assertRaises(SyntaxError, eval, b"\xef\xbb\x20")
  
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 6 for calling the MiscSourceEncodingTest obj's underlying member method code with example usage: obj.test_issue7820() without return types