def test_unimportablePackageGetItem(self):
        """
        If a package has been explicitly forbidden from importing by setting a
        L{None} key in sys.modules under its name,
        L{modules.PythonPath.__getitem__} should still be able to retrieve an
        unloaded L{modules.PythonModule} for that package.
        """
        shouldNotLoad = []
        path = modules.PythonPath(sysPath=[self.pathEntryWithOnePackage().path],
                                  moduleLoader=shouldNotLoad.append,
                                  importerCache={},
                                  sysPathHooks={},
                                  moduleDict={'test_package': None})
        self.assertEqual(shouldNotLoad, [])
        self.assertFalse(path['test_package'].isLoaded())

        If a package has been explicitly forbidden from importing by setting a
        L{None} key in sys.modules under its name,
        L{modules.PythonPath.__getitem__} should still be able to retrieve an
        unloaded L{modules.PythonModule} for that package.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_modules.py