def test_CheckRequired_defined(value): check = CheckRequired() option = Option(name="a", value=value, defined=True) check.check(option, Section())
def test_CheckRequired_undefined(value): check = CheckRequired() option = Option(name="a", value=value, defined=False) with pytest.raises(MissingRequiredOptionError): check.check(option, Section())