def get_spec_tests(spec_test_dir):
 print ('pystache: spec tests: using %s' % _get_parser_info())
 cases = []
 spec_test_dir = os.path.abspath(spec_test_dir)
 spec_paths = glob.glob(os.path.join(spec_test_dir, ('*.%s' % file_extension)))
 for path in spec_paths:
  new_cases = _read_spec_tests(path)
  cases.extend(new_cases)
 spec_test_count = len(cases)
 class CheckSpecTestsFound(unittest.TestCase, ):
  def runTest(self):
   if (spec_test_count > 0):
    return
   raise Exception(('Spec tests not found--\n  in %s\n Consult the README file on how to add the Mustache spec tests.' % repr(spec_test_dir)))
 case = CheckSpecTestsFound()
 cases.append(case)
 return cases

def get_spec_tests ( spec_test_dir ) : print ( 'pystache: spec tests: using %s' % _get_parser_info ( ) ) cases = [ ] spec_test_dir = os . path . abspath ( spec_test_dir ) spec_paths = glob . glob ( os . path . join ( spec_test_dir , ( '*.%s' % file_extension ) ) ) for path in spec_paths : new_cases = _read_spec_tests ( path ) cases . extend ( new_cases ) spec_test_count = len ( cases ) class CheckSpecTestsFound ( unittest . TestCase , ) : def runTest ( self ) : if ( spec_test_count > 0 ) : return raise Exception ( ( 'Spec tests not found--\n  in %s\n Consult the README file on how to add the Mustache spec tests.' % repr ( spec_test_dir ) ) ) case = CheckSpecTestsFound ( ) cases . append ( case ) return cases
return a list of unittest .