本文整理匯總了Python中simple_virtuoso_migrate.config.Config.remove方法的典型用法代碼示例。如果您正苦於以下問題:Python Config.remove方法的具體用法?Python Config.remove怎麽用?Python Config.remove使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類simple_virtuoso_migrate.config.Config
的用法示例。
在下文中一共展示了Config.remove方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_it_should_raise_exception_when_removing_an_inexistent_config_value
# 需要導入模塊: from simple_virtuoso_migrate.config import Config [as 別名]
# 或者: from simple_virtuoso_migrate.config.Config import remove [as 別名]
def test_it_should_raise_exception_when_removing_an_inexistent_config_value(self):
config = Config()
config.put("some_key", "some_value")
try:
config.remove("ANOTHER_KEY")
except Exception, e:
self.assertEqual("invalid configuration key ('another_key')", str(e))
示例2: test_it_should_transform_keys_to_lower_case
# 需要導入模塊: from simple_virtuoso_migrate.config import Config [as 別名]
# 或者: from simple_virtuoso_migrate.config.Config import remove [as 別名]
def test_it_should_transform_keys_to_lower_case(self):
config = Config()
config.put("sOmE_kEy", "original_value")
self.assertEqual("original_value", config.get("SoMe_KeY"))
config.update("sOMe_kEy", "new_value")
self.assertEqual("new_value", config.get("some_KEY"))
config.remove("SOME_KEY")
self.assertRaises(Exception, config.get, "sOMe_KEY")
示例3: test_it_should_remove_saved_config_values
# 需要導入模塊: from simple_virtuoso_migrate.config import Config [as 別名]
# 或者: from simple_virtuoso_migrate.config.Config import remove [as 別名]
def test_it_should_remove_saved_config_values(self):
config = Config()
config.put("some_key", "some_value")
initial = str(config)
config.remove("some_key")
self.assertNotEqual(initial, str(config))