@pytest.mark.skipif((not flag), reason='need correct overlay to run')
def test_fsm_num_states1():
    'Test for the Finite State Machine Generator class.\n\n    The 4th test will check 1 and (MAX_NUM_STATES + 1) states. \n    These cases should raise exceptions. For these tests, we use the minimum \n    number of input and output pins.\n\n    '
    ol.download()
    fsm_generator = None
    exception_raised = False
    (fsm_spec_less_than_min_state, _) = build_fsm_spec_random((FSM_MIN_NUM_STATES - 1))
    (fsm_spec_more_than_max_state, _) = build_fsm_spec_random((FSM_MAX_NUM_STATES + 1))
    for fsm_spec in [fsm_spec_less_than_min_state, fsm_spec_more_than_max_state]:
        num_states = len(fsm_spec['states'])
        try:
            fsm_generator = FSMGenerator(mb_info)
            fsm_generator.trace(use_analyzer=True, num_analyzer_samples=MAX_NUM_TRACE_SAMPLES)
            fsm_generator.setup(fsm_spec)
        except ValueError:
            exception_raised = True
        assert exception_raised, 'Should raise exception when there are {} states in the FSM.'.format(num_states)
        fsm_generator.reset()
        del fsm_generator
Test for the Finite State Machine Generator class.

The 4th test will check 1 and (MAX_NUM_STATES + 1) states. 
These cases should raise exceptions. For these tests, we use the minimum 
number of input and output pins.
@pytest.mark.skipif((not flag), reason='need correct overlay to run')
def test_fsm_num_states1():
    'Test for the Finite State Machine Generator class.\n\n    The 4th test will check 1 and (MAX_NUM_STATES + 1) states. \n    These cases should raise exceptions. For these tests, we use the minimum \n    number of input and output pins.\n\n    '
    ol.download()
    fsm_generator = None
    exception_raised = False
    (fsm_spec_less_than_min_state, _) = build_fsm_spec_random((FSM_MIN_NUM_STATES - 1))
    (fsm_spec_more_than_max_state, _) = build_fsm_spec_random((FSM_MAX_NUM_STATES + 1))
    for fsm_spec in [fsm_spec_less_than_min_state, fsm_spec_more_than_max_state]:
        num_states = len(fsm_spec['states'])
        try:
            fsm_generator = FSMGenerator(mb_info)
            fsm_generator.trace(use_analyzer=True, num_analyzer_samples=MAX_NUM_TRACE_SAMPLES)
            fsm_generator.setup(fsm_spec)
        except ValueError:
            exception_raised = True
        assert exception_raised, 'Should raise exception when there are {} states in the FSM.'.format(num_states)
        fsm_generator.reset()
        del fsm_generator