예제 #1
0
def test_unknown():
    p = MultiModeItem('asdf')
    with pytest.raises(KeyError):
        p.get_mode('asdf')

    p.add_mode(1, BaseMode('mode'))
    with pytest.raises(KeyError):
        p.get_mode('asdf')
예제 #2
0
def test_unknown(parent_rule: DummyRule):
    p = MultiModeItem('asdf')
    with pytest.raises(KeyError):
        p.get_mode('asdf')

    p.add_mode(1, BaseMode('mode'))
    with pytest.raises(KeyError):
        p.get_mode('asdf')