本文整理汇总了Python中ecohydrolib.metadata.GenericMetadata.readClimateGridEntries方法的典型用法代码示例。如果您正苦于以下问题:Python GenericMetadata.readClimateGridEntries方法的具体用法?Python GenericMetadata.readClimateGridEntries怎么用?Python GenericMetadata.readClimateGridEntries使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ecohydrolib.metadata.GenericMetadata
的用法示例。
在下文中一共展示了GenericMetadata.readClimateGridEntries方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_delete
# 需要导入模块: from ecohydrolib.metadata import GenericMetadata [as 别名]
# 或者: from ecohydrolib.metadata.GenericMetadata import readClimateGridEntries [as 别名]
def test_delete(self):
GenericMetadata.writeManifestEntry(self.context, "key1", "value_one")
manifest = GenericMetadata.readManifestEntries(self.context)
self.assertTrue(manifest["key1"] == "value_one")
GenericMetadata.deleteManifestEntry(self.context, "key1")
manifest = GenericMetadata.readManifestEntries(self.context)
self.assertTrue(not 'key1' in manifest)
GenericMetadata.writeStudyAreaEntry(self.context, "key1", "value_one")
studyArea = GenericMetadata.readStudyAreaEntries(self.context)
self.assertTrue(studyArea["key1"] == "value_one")
GenericMetadata.deleteStudyAreaEntry(self.context, 'key1')
studyArea = GenericMetadata.readStudyAreaEntries(self.context)
self.assertTrue(not 'key1' in studyArea)
GenericMetadata.writeClimatePointEntry(self.context, "key1", "value_one")
climatePoint = GenericMetadata.readClimatePointEntries(self.context)
self.assertTrue(climatePoint["key1"] == "value_one")
GenericMetadata.deleteClimatePointEntry(self.context, 'key1')
climatePoint = GenericMetadata.readClimatePointEntries(self.context)
self.assertTrue(not 'key1' in climatePoint)
GenericMetadata.writeClimateGridEntry(self.context, "key1", "value_one")
climateGrid = GenericMetadata.readClimateGridEntries(self.context)
self.assertTrue(climateGrid["key1"] == "value_one")
GenericMetadata.deleteClimateGridEntry(self.context, 'key1')
climateGrid = GenericMetadata.readClimateGridEntries(self.context)
self.assertTrue(not 'key1' in climateGrid)
# Delete and empty entry
GenericMetadata.deleteClimateGridEntry(self.context, "not_in_store")
示例2: test_empty_read
# 需要导入模块: from ecohydrolib.metadata import GenericMetadata [as 别名]
# 或者: from ecohydrolib.metadata.GenericMetadata import readClimateGridEntries [as 别名]
def test_empty_read(self):
manifest = GenericMetadata.readManifestEntries(self.context)
self.assertTrue(len(manifest) == 0)
studyArea = GenericMetadata.readStudyAreaEntries(self.context)
self.assertTrue(len(studyArea) == 0)
climatePoint = GenericMetadata.readClimatePointEntries(self.context)
self.assertTrue(len(climatePoint) == 0)
climateGrid = GenericMetadata.readClimateGridEntries(self.context)
self.assertTrue(len(climateGrid) == 0)
示例3: test_delete
# 需要导入模块: from ecohydrolib.metadata import GenericMetadata [as 别名]
# 或者: from ecohydrolib.metadata.GenericMetadata import readClimateGridEntries [as 别名]
def test_delete(self):
GenericMetadata.writeManifestEntry(self.context, "key1", "value_one")
manifest = GenericMetadata.readManifestEntries(self.context)
self.assertTrue(manifest["key1"] == "value_one")
GenericMetadata.deleteManifestEntry(self.context, "key1")
manifest = GenericMetadata.readManifestEntries(self.context)
self.assertTrue(not 'key1' in manifest)
GenericMetadata.writeStudyAreaEntry(self.context, "key1", "value_one")
studyArea = GenericMetadata.readStudyAreaEntries(self.context)
self.assertTrue(studyArea["key1"] == "value_one")
GenericMetadata.deleteStudyAreaEntry(self.context, 'key1')
studyArea = GenericMetadata.readStudyAreaEntries(self.context)
self.assertTrue(not 'key1' in studyArea)
GenericMetadata.writeClimatePointEntry(self.context, "key1", "value_one")
climatePoint = GenericMetadata.readClimatePointEntries(self.context)
self.assertTrue(climatePoint["key1"] == "value_one")
GenericMetadata.deleteClimatePointEntry(self.context, 'key1')
climatePoint = GenericMetadata.readClimatePointEntries(self.context)
self.assertTrue(not 'key1' in climatePoint)
GenericMetadata.writeClimateGridEntry(self.context, "key1", "value_one")
climateGrid = GenericMetadata.readClimateGridEntries(self.context)
self.assertTrue(climateGrid["key1"] == "value_one")
GenericMetadata.deleteClimateGridEntry(self.context, 'key1')
climateGrid = GenericMetadata.readClimateGridEntries(self.context)
self.assertTrue(not 'key1' in climateGrid)
# Delete and empty entry
GenericMetadata.deleteClimateGridEntry(self.context, "not_in_store")
GenericMetadata.writeHydroShareEntry(self.context, "resource_id", "fae3688aa1354fb2a558380669229a66")
hydroshare = GenericMetadata.readHydroShareEntries(self.context)
self.assertTrue(hydroshare["resource_id"] == "fae3688aa1354fb2a558380669229a66")
GenericMetadata.deleteHydroShareEntry(self.context, "resource_id")
hydroshare = GenericMetadata.readHydroShareEntries(self.context)
self.assertTrue(not 'resource_id' in hydroshare)
示例4: test_write_and_read
# 需要导入模块: from ecohydrolib.metadata import GenericMetadata [as 别名]
# 或者: from ecohydrolib.metadata.GenericMetadata import readClimateGridEntries [as 别名]
def test_write_and_read(self):
GenericMetadata.writeManifestEntry(self.context, "key1", "value_one")
GenericMetadata.writeManifestEntry(self.context, "key2", "value_two")
manifest = GenericMetadata.readManifestEntries(self.context)
self.assertTrue(manifest["key1"] == "value_one")
GenericMetadata.writeStudyAreaEntry(self.context, "key1", "value_one")
GenericMetadata.writeStudyAreaEntry(self.context, "key2", "value_two")
studyArea = GenericMetadata.readStudyAreaEntries(self.context)
self.assertTrue(studyArea["key1"] == "value_one")
GenericMetadata.writeClimatePointEntry(self.context, "key1", "value_one")
GenericMetadata.writeClimatePointEntry(self.context, "key2", "value_two")
climatePoint = GenericMetadata.readClimatePointEntries(self.context)
self.assertTrue(climatePoint["key1"] == "value_one")
GenericMetadata.writeClimateGridEntry(self.context, "key1", "value_one")
GenericMetadata.writeClimateGridEntry(self.context, "key2", "value_two")
climateGrid = GenericMetadata.readClimateGridEntries(self.context)
self.assertTrue(climateGrid["key1"] == "value_one")
示例5: test_write_and_read
# 需要导入模块: from ecohydrolib.metadata import GenericMetadata [as 别名]
# 或者: from ecohydrolib.metadata.GenericMetadata import readClimateGridEntries [as 别名]
def test_write_and_read(self):
GenericMetadata.writeManifestEntry(self.context, "key1", "value_one")
GenericMetadata.writeManifestEntry(self.context, "key2", "value_two")
manifest = GenericMetadata.readManifestEntries(self.context)
self.assertTrue(manifest["key1"] == "value_one")
GenericMetadata.writeStudyAreaEntry(self.context, "key1", "value_one")
GenericMetadata.writeStudyAreaEntry(self.context, "key2", "value_two")
studyArea = GenericMetadata.readStudyAreaEntries(self.context)
self.assertTrue(studyArea["key1"] == "value_one")
GenericMetadata.writeClimatePointEntry(self.context, "key1", "value_one")
GenericMetadata.writeClimatePointEntry(self.context, "key2", "value_two")
climatePoint = GenericMetadata.readClimatePointEntries(self.context)
self.assertTrue(climatePoint["key1"] == "value_one")
GenericMetadata.writeClimateGridEntry(self.context, "key1", "value_one")
GenericMetadata.writeClimateGridEntry(self.context, "key2", "value_two")
climateGrid = GenericMetadata.readClimateGridEntries(self.context)
self.assertTrue(climateGrid["key1"] == "value_one")
GenericMetadata.writeHydroShareEntry(self.context, "resource_id", "fae3688aa1354fb2a558380669229a66")
hydroshare = GenericMetadata.readHydroShareEntries(self.context)
self.assertTrue(hydroshare["resource_id"] == "fae3688aa1354fb2a558380669229a66")