def test_invalid_fsms():
    try:
        fsm(alphabet={}, states={}, initial=1, finals=set(), map={})
        assert False
    except AssertionError:
        assert False
    except Exception:
        pass
    try:
        fsm(alphabet={}, states={1}, initial=1, finals={2}, map={})
        assert False
    except AssertionError:
        assert False
    except Exception:
        pass
    try:
        fsm(alphabet={'a'}, states={1}, initial=1, finals=set(), map={1: {'a': 2}})
        assert False
    except AssertionError:
        assert False
    except Exception:
        pass
def test_invalid_fsms():
    try:
        fsm(alphabet={}, states={}, initial=1, finals=set(), map={})
        assert False
    except AssertionError:
        assert False
    except Exception:
        pass
    try:
        fsm(alphabet={}, states={1}, initial=1, finals={2}, map={})
        assert False
    except AssertionError:
        assert False
    except Exception:
        pass
    try:
        fsm(alphabet={'a'}, states={1}, initial=1, finals=set(), map={1: {'a': 2}})
        assert False
    except AssertionError:
        assert False
    except Exception:
        pass