#NEWLINE# def _importSuite( self ) : #NEWLINE# #INDENT# theSuite = None #NEWLINE# if ( self . module not in self . alreadyRecursed ) : #NEWLINE# #INDENT# self . alreadyRecursed . append ( path . module ) #NEWLINE# try : #NEWLINE# #INDENT# theSuite = doctest . DocTestSuite ( self . module ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# theSuite = None #NEWLINE# #UNINDENT# if self . packageRecurse : #NEWLINE# #INDENT# for path in getattr ( self . module , '__path__' , [ ] ) : #NEWLINE# #INDENT# for name in os . listdir ( path ) : #NEWLINE# #INDENT# newPath = os . path . join ( path , name ) #NEWLINE# ( basename , ext ) = os . path . splitext ( name ) #NEWLINE# if ( ( os . path . isfile ( newPath ) and ( ext in ( '.py' , '.pyo' , '.pyc' ) ) and ( basename != '__init__' ) ) or ( os . path . isdir ( newPath ) and os . path . isfile ( os . path . join ( newPath , '__init__.py' ) ) ) ) : #NEWLINE# #INDENT# newModuleName = ( ( self . moduleName + '.' ) + basename ) #NEWLINE# newSuite = DoctestSuiteFromModule ( newModuleName , testImport = False , packageRecurse = True , alreadyRecursed = self . alreadyRecursed ) #NEWLINE# if newSuite . countTestCases ( ) : #NEWLINE# #INDENT# theSuite . addTest ( newSuite ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if ( not theSuite ) : #NEWLINE# #INDENT# theSuite = TestSuite ( ) #NEWLINE# #UNINDENT# return theSuite