def test_Field_preprocess(): assert Field.preprocess(False) is False assert Field.preprocess(True) is True assert Field.preprocess(0) is False assert Field.preprocess(1) is True raises(OptionError, lambda: Field.preprocess(x))
def test_Field_postprocess(): opt = {'field': True} Field.postprocess(opt) assert opt == {'field': True}