class_docstr: Tests for PathFinder.
class_docstr_tok: ["Tests","for","PathFinder","."]
code: def test_None_on_sys_path(self):
      # Putting None in sys.path[0] caused an import regression from Python
      # 3.2: http://bugs.python.org/issue16514
      new_path = sys.path[:]
      new_path.insert(0, None)
      new_path_importer_cache = sys.path_importer_cache.copy()
      new_path_importer_cache.pop(None, None)
      new_path_hooks = [
          zipimport.zipimporter,
          self.machinery.FileFinder.path_hook(
              *self.importlib._bootstrap_external._get_supported_file_loaders()
          ),
      ]
      missing = object()
      email = sys.modules.pop("email", missing)
      try:
          with util.import_state(
              meta_path=sys.meta_path[:],
              path=new_path,
              path_importer_cache=new_path_importer_cache,
              path_hooks=new_path_hooks,
          ):
              module = self.importlib.import_module("email")
              self.assertIsInstance(module, ModuleType)
      finally:
          if email is not missing:
              sys.modules["email"] = email
  
imports: from test.test_importlib import util
  import os
  import sys
  import tempfile
  from types import ModuleType
  import unittest
  import warnings
  import zipimport
label_desc: Use image node_id 8 for calling the FinderTests obj's underlying member method code with example usage: obj.test_None_on_sys_path() without return types