Пример #1
0
def test_CheckRequired_defined(value):
    check = CheckRequired()
    option = Option(name="a", value=value, defined=True)
    check.check(option, Section())
Пример #2
0
def test_CheckRequired_undefined(value):
    check = CheckRequired()
    option = Option(name="a", value=value, defined=False)
    with pytest.raises(MissingRequiredOptionError):
        check.check(option, Section())