def test_booleanvar_other(text): assume(text not in (TRUE_VALUES + FALSE_VALUES)) with pytest.raises(ValueError): BooleanVar()._to_python(text)