assertTrue(instance.implementsDescrSet());
assertFalse(instance.implementsDescrDelete());
}
public void testFieldSetter() throws Exception {
PyDataDescr instance = makeDescriptor(new DescSetup() {
public void setup(DescriptorExposer de) {
de.addFieldGetter("toStringVal", STRING);
de.addFieldSetter("toStringVal", STRING);
}
});
instance.__set__(se, Py.newString(NEW_VAL));
assertEquals(NEW_VAL, se.toString());
assertTrue(instance.implementsDescrSet());
assertFalse(instance.implementsDescrDelete());
}