本文整理匯總了Python中ecohydrolib.metadata.GenericMetadata.writeClimateGridEntry方法的典型用法代碼示例。如果您正苦於以下問題:Python GenericMetadata.writeClimateGridEntry方法的具體用法?Python GenericMetadata.writeClimateGridEntry怎麽用?Python GenericMetadata.writeClimateGridEntry使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ecohydrolib.metadata.GenericMetadata
的用法示例。
在下文中一共展示了GenericMetadata.writeClimateGridEntry方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_delete
# 需要導入模塊: from ecohydrolib.metadata import GenericMetadata [as 別名]
# 或者: from ecohydrolib.metadata.GenericMetadata import writeClimateGridEntry [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_write_and_read
# 需要導入模塊: from ecohydrolib.metadata import GenericMetadata [as 別名]
# 或者: from ecohydrolib.metadata.GenericMetadata import writeClimateGridEntry [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")
示例3: test_delete
# 需要導入模塊: from ecohydrolib.metadata import GenericMetadata [as 別名]
# 或者: from ecohydrolib.metadata.GenericMetadata import writeClimateGridEntry [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 writeClimateGridEntry [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")