#NEWLINE# def wantFile( self , filename ) : #NEWLINE# #INDENT# 'Return whether the given filename should be scanned for tests.\n\n        Modified version that accepts extension modules as valid containers for\n        doctests.\n        ' #NEWLINE# for pat in self . exclude_patterns : #NEWLINE# #INDENT# if pat . search ( filename ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# #UNINDENT# if is_extension_module ( filename ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return doctests . Doctest . wantFile ( self , filename )