当前位置: 首页>>代码示例>>Python>>正文


Python GenericMetadata.writeClimatePointEntry方法代码示例

本文整理汇总了Python中ecohydrolib.metadata.GenericMetadata.writeClimatePointEntry方法的典型用法代码示例。如果您正苦于以下问题:Python GenericMetadata.writeClimatePointEntry方法的具体用法?Python GenericMetadata.writeClimatePointEntry怎么用?Python GenericMetadata.writeClimatePointEntry使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ecohydrolib.metadata.GenericMetadata的用法示例。


在下文中一共展示了GenericMetadata.writeClimatePointEntry方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_delete

# 需要导入模块: from ecohydrolib.metadata import GenericMetadata [as 别名]
# 或者: from ecohydrolib.metadata.GenericMetadata import writeClimatePointEntry [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")
开发者ID:npp2016,项目名称:EcohydroLib,代码行数:32,代码来源:test_metadata.py

示例2: test_write_and_read

# 需要导入模块: from ecohydrolib.metadata import GenericMetadata [as 别名]
# 或者: from ecohydrolib.metadata.GenericMetadata import writeClimatePointEntry [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")
开发者ID:npp2016,项目名称:EcohydroLib,代码行数:22,代码来源:test_metadata.py

示例3: test_delete

# 需要导入模块: from ecohydrolib.metadata import GenericMetadata [as 别名]
# 或者: from ecohydrolib.metadata.GenericMetadata import writeClimatePointEntry [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)
开发者ID:dblodgett-usgs,项目名称:EcohydroLib,代码行数:39,代码来源:test_metadata.py

示例4: test_write_and_read

# 需要导入模块: from ecohydrolib.metadata import GenericMetadata [as 别名]
# 或者: from ecohydrolib.metadata.GenericMetadata import writeClimatePointEntry [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")
开发者ID:dblodgett-usgs,项目名称:EcohydroLib,代码行数:26,代码来源:test_metadata.py


注:本文中的ecohydrolib.metadata.GenericMetadata.writeClimatePointEntry方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。