def _get_all_test_class_names_in_jar(jar):
 test_class_names = []
 zip_file = zipfile.ZipFile(jar, 'r')
 name_list = zip_file.namelist()
 for name in name_list:
  basename = os.path.basename(name)
  if (basename.endswith('Test.class') and (len(basename) > len('Test.class')) and (not ('$' in basename))):
   class_name = name.replace('/', '.')[:(-6)]
   test_class_names.append(class_name)
 zip_file.close()
 return test_class_names

def _get_all_test_class_names_in_jar ( jar ) : test_class_names = [ ] zip_file = zipfile . ZipFile ( jar , 'r' ) name_list = zip_file . namelist ( ) for name in name_list : basename = os . path . basename ( name ) if ( basename . endswith ( 'Test.class' ) and ( len ( basename ) > len ( 'Test.class' ) ) and ( not ( '$' in basename ) ) ) : class_name = name . replace ( '/' , '.' ) [ : ( - 6 ) ] test_class_names . append ( class_name ) zip_file . close ( ) return test_class_names
returns a list of test class names in the jar file .