def testWrappers(self): image = ImageI() info = image._field_info assert info.name.wrapper == rstring assert info.acquisitionDate.wrapper == rtime assert not info.name.nullable assert not info.acquisitionDate.nullable image.setAcquisitionDate("1", wrap=True) assert type(image.acquisitionDate) == type(rtime(0)) # The following causes pytest to fail! # image.setAcquisitionDate("", wrap=True) # Note: collections still don't work well if False: image.addPixels(PixelsI()) image.setPixels(0, "Pixels:1", wrap=True) assert type(image.pixels) == omero.model.PixelsI image.setPixels(0, "Pixels", wrap=True) image.setPixels(0, "Unknown", wrap=True) link = DatasetImageLinkI() link.setParent("Dataset:1") link.setChild("Image:1")
def testWrappers(self): image = ImageI() info = image._field_info assert info.name.wrapper == rstring assert info.acquisitionDate.wrapper == rtime assert not info.name.nullable assert info.acquisitionDate.nullable image.setAcquisitionDate("1", wrap=True) assert type(image.acquisitionDate) == type(rtime(0)) # The following causes pytest to fail! # image.setAcquisitionDate("", wrap=True) # Note: collections still don't work well if False: image.addPixels(PixelsI()) image.setPixels(0, "Pixels:1", wrap=True) assert type(image.pixels) == omero.model.PixelsI image.setPixels(0, "Pixels", wrap=True) image.setPixels(0, "Unknown", wrap=True) link = DatasetImageLinkI() link.setParent("Dataset:1") link.setChild("Image:1")