def findtests(testdir=None, stdtests=STDTESTS, nottests=NOTTESTS):
 testdir = findtestdir(testdir)
 names = os.listdir(testdir)
 tests = []
 others = (set(stdtests) | nottests)
 for name in names:
  (modname, ext) = os.path.splitext(name)
  if ((modname[:5] == 'test_') and (ext == '.py') and (modname not in others)):
   tests.append(modname)
 return (stdtests + sorted(tests))

def findtests ( testdir = None , stdtests = STDTESTS , nottests = NOTTESTS ) : testdir = findtestdir ( testdir ) names = os . listdir ( testdir ) tests = [ ] others = ( set ( stdtests ) | nottests ) for name in names : ( modname , ext ) = os . path . splitext ( name ) if ( ( modname [ : 5 ] == 'test_' ) and ( ext == '.py' ) and ( modname not in others ) ) : tests . append ( modname ) return ( stdtests + sorted ( tests ) )
return a list of all applicable test modules .