def find_test_dir(start_dir=None):
 if (not start_dir):
  start_dir = '.'
 target = os.path.abspath(start_dir)
 while True:
  if (os.path.isdir(os.path.join(target, 'Bio')) and os.path.isdir(os.path.join(target, 'Tests'))):
   return os.path.abspath(os.path.join(target, 'Tests'))
  (new, tmp) = os.path.split(target)
  if (target == new):
   break
  target = new
 raise ValueError(('Not within Biopython source tree: %r' % os.path.abspath(start_dir)))

def find_test_dir ( start_dir = None ) : if ( not start_dir ) : start_dir = '.' target = os . path . abspath ( start_dir ) while True : if ( os . path . isdir ( os . path . join ( target , 'Bio' ) ) and os . path . isdir ( os . path . join ( target , 'Tests' ) ) ) : return os . path . abspath ( os . path . join ( target , 'Tests' ) ) ( new , tmp ) = os . path . split ( target ) if ( target == new ) : break target = new raise ValueError ( ( 'Not within Biopython source tree: %r' % os . path . abspath ( start_dir ) ) )
finds the absolute path of biopythons tests directory .