def generate_skip_decorator(bear):
 result = bear.check_prerequisites()
 return (skip(result) if isinstance(result, str) else skipIf((not result), '(No reason given.)'))

def generate_skip_decorator ( bear ) : result = bear . check_prerequisites ( ) return ( skip ( result ) if isinstance ( result , str ) else skipIf ( ( not result ) , '(No reason given.)' ) )
creates a skip decorator for a unittest module test from a bear .