本文整理汇总了Python中iiif.info.IIIFInfo.level方法的典型用法代码示例。如果您正苦于以下问题:Python IIIFInfo.level方法的具体用法?Python IIIFInfo.level怎么用?Python IIIFInfo.level使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类iiif.info.IIIFInfo
的用法示例。
在下文中一共展示了IIIFInfo.level方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test05_level_and_profile
# 需要导入模块: from iiif.info import IIIFInfo [as 别名]
# 或者: from iiif.info.IIIFInfo import level [as 别名]
def test05_level_and_profile(self):
i = IIIFInfo(api_version='1.1')
i.level = 0
self.assertEqual( i.level, 0 )
self.assertEqual( i.profile, "http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0" )
i.level = 2
self.assertEqual( i.level, 2 )
self.assertEqual( i.profile, "http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2" )
i.profile = "http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1"
self.assertEqual( i.level, 1 )
示例2: test05_level_and_profile
# 需要导入模块: from iiif.info import IIIFInfo [as 别名]
# 或者: from iiif.info.IIIFInfo import level [as 别名]
def test05_level_and_profile(self):
"""Test level and profile."""
i = IIIFInfo()
i.level = 0
self.assertEqual(i.level, 0)
self.assertEqual(i.compliance, "http://iiif.io/api/image/2/level0.json")
self.assertEqual(i.profile, ["http://iiif.io/api/image/2/level0.json"])
i.level = 2
self.assertEqual(i.level, 2)
self.assertEqual(i.compliance, "http://iiif.io/api/image/2/level2.json")
self.assertEqual(i.profile, ["http://iiif.io/api/image/2/level2.json"])
示例3: test05_level_and_profile
# 需要导入模块: from iiif.info import IIIFInfo [as 别名]
# 或者: from iiif.info.IIIFInfo import level [as 别名]
def test05_level_and_profile(self):
"""Test level and profile setting."""
i = IIIFInfo(api_version='2.1')
i.level = 0
self.assertEqual(i.level, 0)
self.assertEqual(i.compliance, "http://iiif.io/api/image/2/level0.json")
i.level = 2
self.assertEqual(i.level, 2)
self.assertEqual(i.compliance, "http://iiif.io/api/image/2/level2.json")
# Set via compliance
i.compliance = "http://iiif.io/api/image/2/level1.json"
self.assertEqual(i.level, 1)
# Set via profile
i.profile = ["http://iiif.io/api/image/2/level1.json"]
self.assertEqual(i.level, 1)
# Set new via compliance
i = IIIFInfo(api_version='2.1')
i.compliance = "http://iiif.io/api/image/2/level1.json"
self.assertEqual(i.level, 1)