<s> """<STR_LIT>""" <EOL> import sys <EOL> import unittest <EOL> from StringIO import StringIO <EOL> from supervisor import states <EOL> class TopLevelProcessStateTests ( unittest . TestCase ) : <EOL> def test_module_has_process_states ( self ) : <EOL> self . assertTrue ( hasattr ( states , '<STR_LIT>' ) ) <EOL> def test_stopped_states_do_not_overlap_with_running_states ( self ) : <EOL> for state in states . STOPPED_STATES : <EOL> self . assertFalse ( state in states . RUNNING_STATES ) <EOL> def test_running_states_do_not_overlap_with_stopped_states ( self ) : <EOL> for state in states . RUNNING_STATES : <EOL> self . assertFalse ( state in states . STOPPED_STATES ) <EOL> def test_getProcessStateDescription_returns_string_when_found ( self ) : <EOL> state = states . ProcessStates . STARTING <EOL> self . assertEqual ( states . getProcessStateDescription ( state ) , <EOL> '<STR_LIT>' ) <EOL> def test_getProcessStateDescription_returns_None_when_not_found ( self ) : <EOL> self . assertEqual ( states . getProcessStateDescription ( <NUM_LIT> ) , <EOL> None ) <EOL> class TopLevelSupervisorStateTests ( unittest . TestCase ) : <EOL> def test_module_has_supervisor_states ( self ) : <EOL> self . assertTrue ( hasattr ( states , '<STR_LIT>' ) ) <EOL> def test_getSupervisorStateDescription_returns_string_when_found ( self ) : <EOL> state = states . SupervisorStates . RUNNING <EOL> self . assertEqual ( states . getSupervisorStateDescription ( state ) , <EOL> '<STR_LIT>' ) <EOL> def test_getSupervisorStateDescription_returns_None_when_not_found ( self ) : <EOL> self . assertEqual ( states . getSupervisorStateDescription ( <NUM_LIT> ) , <EOL> None ) <EOL> class TopLevelEventListenerStateTests ( unittest . TestCase ) : <EOL> def test_module_has_eventlistener_states ( self ) : <EOL> self . assertTrue ( hasattr ( states , '<STR_LIT>' ) ) <EOL> def test_getEventListenerStateDescription_returns_string_when_found ( self ) : <EOL> state = states . EventListenerStates . ACKNOWLEDGED <EOL> self . assertEqual ( states . getEventListenerStateDescription ( state ) , <EOL> '<STR_LIT>' ) <EOL> def test_getEventListenerStateDescription_returns_None_when_not_found ( self ) : <EOL> self . assertEqual ( states . getEventListenerStateDescription ( <NUM_LIT> ) , <EOL> None ) <EOL> def test_suite ( ) : <EOL> return unittest . findTestCases ( sys . modules [ __name__ ] ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( defaultTest = '<STR_LIT>' ) </s>
