本文整理汇总了Python中omero_model_ImageI.ImageI.getName方法的典型用法代码示例。如果您正苦于以下问题:Python ImageI.getName方法的具体用法?Python ImageI.getName怎么用?Python ImageI.getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类omero_model_ImageI.ImageI
的用法示例。
在下文中一共展示了ImageI.getName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testUnloadCheckPtr
# 需要导入模块: from omero_model_ImageI import ImageI [as 别名]
# 或者: from omero_model_ImageI.ImageI import getName [as 别名]
def testUnloadCheckPtr(self):
img = ImageI()
assert img.isLoaded()
assert img.getDetails() # details are auto instantiated
assert not img.getName() # no other single-valued field is
img.unload()
assert not img.isLoaded()
pytest.raises(omero.UnloadedEntityException, img.getDetails)
示例2: testGetAttrGood
# 需要导入模块: from omero_model_ImageI import ImageI [as 别名]
# 或者: from omero_model_ImageI.ImageI import getName [as 别名]
def testGetAttrGood(self):
i = ImageI()
assert i.loaded
assert i.isLoaded()
assert not i.name
i.name = rstring("name")
assert i.name
i.setName(None)
assert not i.getName()
i.copyAnnotationLinks()
i.linkAnnotation(omero.model.BooleanAnnotationI())
示例3: testAccessors
# 需要导入模块: from omero_model_ImageI import ImageI [as 别名]
# 或者: from omero_model_ImageI.ImageI import getName [as 别名]
def testAccessors(self):
name = rstring("name")
img = ImageI()
assert not img.getName()
img.setName(name)
assert img.getName()
name = img.getName()
assert name.val == "name"
assert name == name
img.setName(rstring("name2"))
assert img.getName().val == "name2"
assert img.getName()
img.unload()
try:
assert not img.getName()
assert False, "should fail"
except:
# Is true, but cannot test
pass
示例4: testAccessors
# 需要导入模块: from omero_model_ImageI import ImageI [as 别名]
# 或者: from omero_model_ImageI.ImageI import getName [as 别名]
def testAccessors(self):
name = rstring("name")
img = ImageI()
self.assert_( not img.getName() )
img.setName( name )
self.assert_( img.getName() )
name = img.getName()
self.assert_( name.val == "name" )
self.assert_( name == name )
img.setName(rstring("name2"))
self.assert_( img.getName().val == "name2" )
self.assert_( img.getName() )
img.unload()
try:
self.assert_( not img.getName() )
self.fail("should fail")
except:
# Is true, but cannot test
pass