<s> """<STR_LIT>""" <EOL> import errno <EOL> from test import test_support <EOL> import unittest <EOL> std_c_errors = frozenset ( [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> class ErrnoAttributeTests ( unittest . TestCase ) : <EOL> def test_for_improper_attributes ( self ) : <EOL> for error_code in std_c_errors : <EOL> self . assertTrue ( hasattr ( errno , error_code ) , <EOL> "<STR_LIT>" % error_code ) <EOL> def test_using_errorcode ( self ) : <EOL> for value in errno . errorcode . itervalues ( ) : <EOL> self . assertTrue ( hasattr ( errno , value ) , '<STR_LIT>' % value ) <EOL> class ErrorcodeTests ( unittest . TestCase ) : <EOL> def test_attributes_in_errorcode ( self ) : <EOL> for attribute in errno . __dict__ . iterkeys ( ) : <EOL> if attribute . isupper ( ) : <EOL> self . assertIn ( getattr ( errno , attribute ) , errno . errorcode , <EOL> '<STR_LIT>' % attribute ) <EOL> def test_main ( ) : <EOL> test_support . run_unittest ( ErrnoAttributeTests , ErrorcodeTests ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> test_main ( ) </s>
