#NEWLINE# def test_7( self ) : #NEWLINE# #INDENT# hier = [ ( 't7' , None ) , ( ( ( 't7' + os . extsep ) + 'py' ) , '' ) , ( ( ( 't7 __init__' + os . extsep ) + 'py' ) , '' ) , ( ( ( 't7 sub' + os . extsep ) + 'py' ) , "raise RuntimeError('Shouldnt load sub.py')" ) , ( 't7 sub' , None ) , ( ( ( 't7 sub __init__' + os . extsep ) + 'py' ) , '' ) , ( ( ( 't7 sub ' + os . extsep ) + 'py' ) , "raise RuntimeError('Shouldnt load subsub.py')" ) , ( 't7 sub subsub' , None ) , ( ( ( 't7 sub subsub __init__' + os . extsep ) + 'py' ) , 'spam = 1' ) ] #NEWLINE# self . mkhier ( sub ) #NEWLINE# ( t7 , sub , subsub ) = ( None , None , None ) #NEWLINE# import t7 as tas #NEWLINE# self . assertEqual ( fixdir ( dir ( tas ) ) , [ '__doc__' , '__file__' , '__name__' , '__package__' , '__path__' ] ) #NEWLINE# self . assertFalse ( t7 ) #NEWLINE# from t7 import sub as subpar #NEWLINE# self . assertEqual ( fixdir ( dir ( subpar ) ) , [ '__doc__' , '__file__' , '__name__' , '__package__' , '__path__' ] ) #NEWLINE# self . assertFalse ( t7 ) #NEWLINE# self . assertFalse ( sub ) #NEWLINE# from t7.sub import subsub as subsubsub #NEWLINE# self . assertEqual ( fixdir ( dir ( subsubsub ) ) , [ '__doc__' , '__file__' , '__name__' , '__package__' , '__path__' , 'spam' ] ) #NEWLINE# self . assertFalse ( t7 ) #NEWLINE# self . assertFalse ( sub ) #NEWLINE# self . assertFalse ( subsub ) #NEWLINE# from t7.sub.subsub import spam as ham #NEWLINE# self . assertEqual ( ham , 1 ) #NEWLINE# self . assertFalse ( t7 ) #NEWLINE# self . assertFalse ( sub ) #NEWLINE# self . assertFalse ( subsub )