def test_binary_3():
    div3 = fsm(alphabet={'0', '1'}, states={'initial', 'zero', 0, 1, 2, None}, initial='initial', finals={'zero', 0}, map={'initial': {'0': 'zero', '1': 1}, 'zero': {'0': None, '1': None}, 0: {'0': 0, '1': 1}, 1: {'0': 2, '1': 0}, 2: {'0': 1, '1': 2}, None: {'0': None, '1': None}})
    assert (not div3.accepts(''))
    assert div3.accepts('0')
    assert (not div3.accepts('1'))
    assert (not div3.accepts('00'))
    assert (not div3.accepts('01'))
    assert (not div3.accepts('10'))
    assert div3.accepts('11')
    assert (not div3.accepts('000'))
    assert (not div3.accepts('001'))
    assert (not div3.accepts('010'))
    assert (not div3.accepts('011'))
    assert (not div3.accepts('100'))
    assert (not div3.accepts('101'))
    assert div3.accepts('110')
    assert (not div3.accepts('111'))
    assert (not div3.accepts('0000'))
    assert (not div3.accepts('0001'))
    assert (not div3.accepts('0010'))
    assert (not div3.accepts('0011'))
    assert (not div3.accepts('0100'))
    assert (not div3.accepts('0101'))
    assert (not div3.accepts('0110'))
    assert (not div3.accepts('0111'))
    assert (not div3.accepts('1000'))
    assert div3.accepts('1001')
def test_binary_3():
    div3 = fsm(alphabet={'0', '1'}, states={'initial', 'zero', 0, 1, 2, None}, initial='initial', finals={'zero', 0}, map={'initial': {'0': 'zero', '1': 1}, 'zero': {'0': None, '1': None}, 0: {'0': 0, '1': 1}, 1: {'0': 2, '1': 0}, 2: {'0': 1, '1': 2}, None: {'0': None, '1': None}})
    assert (not div3.accepts())
    assert div3.accepts('0')
    assert (not div3.accepts('1'))
    assert (not div3.accepts('00'))
    assert (not div3.accepts('01'))
    assert (not div3.accepts('10'))
    assert div3.accepts('11')
    assert (not div3.accepts('000'))
    assert (not div3.accepts('001'))
    assert (not div3.accepts('010'))
    assert (not div3.accepts('011'))
    assert (not div3.accepts('100'))
    assert (not div3.accepts('101'))
    assert div3.accepts('110')
    assert (not div3.accepts('111'))
    assert (not div3.accepts('0000'))
    assert (not div3.accepts('0001'))
    assert (not div3.accepts('0010'))
    assert (not div3.accepts('0011'))
    assert (not div3.accepts('0100'))
    assert (not div3.accepts('0101'))
    assert (not div3.accepts('0110'))
    assert (not div3.accepts('0111'))
    assert (not div3.accepts('1000'))
    assert div3.accepts('1001')