#NEWLINE# def test_unimportablePackageWalkModules( self ) : #NEWLINE# #INDENT# '\n        If a package has been explicitly forbidden from importing by setting a\n        C{None} key in sys.modules under its name, L{modules.walkModules} should\n        still be able to retrieve an unloaded L{modules.PythonModule} for that\n        package.\n        ' #NEWLINE# existentPath = self . pathEntryWithOnePackage ( ) #NEWLINE# self . replaceSysPath ( [ existentPath . path ] ) #NEWLINE# self . replaceSysModules ( { #NEWLINE# #INDENT# 'test_package' : None , #NEWLINE# #UNINDENT# } ) #NEWLINE# walked = list ( modules . walkModules ( ) ) #NEWLINE# self . assertEqual ( [ m . name for m in walked ] , [ 'test_package' ] ) #NEWLINE# self . assertEqual ( walked [ 0 ] . isLoaded ( ) , False )