def generate_test_cases():
 for p in sickbeard.providers.__all__:
  provider = sickbeard.providers.getProviderModule(p).provider
  if (provider.supports_backlog and (provider.provider_type == u'torrent') and provider.public):
   generated_class = type(str(provider.name), (BaseParser.TestCase,), {u'provider': provider})
   globals()[generated_class.__name__] = generated_class
   del generated_class

def generate_test_cases ( ) : for p in sickbeard . providers . __all__ : provider = sickbeard . providers . getProviderModule ( p ) . provider if ( provider . supports_backlog and ( provider . provider_type == u'torrent' ) and provider . public ) : generated_class = type ( str ( provider . name ) , ( BaseParser . TestCase , ) , { u'provider' : provider } ) globals ( ) [ generated_class . __name__ ] = generated_class del generated_class
auto generate testcases from providers and add them to globals() .