class_docstr: Test finding frozen modules.
class_docstr_tok: ["Test","finding","frozen","modules","."]
docstr: This is only called when testing packages.
docstr_tok: ["This","is","only","called","when","testing","packages","."]
code: def check_search_locations(self, spec):
      """This is only called when testing packages."""
      missing = object()
      filename = getattr(spec.loader_state, "filename", missing)
      origname = getattr(spec.loader_state, "origname", None)
      if not origname or filename is missing:
          # We deal with this in check_loader_state().
          return
      if not filename:
          expected = []
      elif origname != spec.name and not origname.startswith("<"):
          expected = []
      else:
          expected = [os.path.dirname(filename)]
      self.assertListEqual(spec.submodule_search_locations, expected)
  
file_path: cpython/Lib/test/test_importlib/frozen/test_finder.py
imports: from test.test_importlib import abc, util
  import os.path
  import unittest
  from test.support import import_helper, REPO_ROOT, STDLIB_DIR
label_desc: Use image node_id 4 for calling the FindSpecTests obj's underlying member method code with example usage: obj.check_search_locations(spec) without return types