'If a package has been explicitly forbidden from importing by setting a
L{None} key in sys.modules under its name, L{modules.walkModules} should
still be able to retrieve an unloaded L{modules.PythonModule} for that
package.'

def test_unimportablePackageWalkModules(self):

    existentPath = self.pathEntryWithOnePackage()
    self.replaceSysPath([existentPath.path])
    self.replaceSysModules({'test_package': None})
    walked = list(modules.walkModules())
    self.assertEqual([m.name for m in walked], ['test_package'])
    self.assertFalse(walked[0].isLoaded())
