本文整理汇总了Python中properties.Properties.equalsDict方法的典型用法代码示例。如果您正苦于以下问题:Python Properties.equalsDict方法的具体用法?Python Properties.equalsDict怎么用?Python Properties.equalsDict使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类properties.Properties
的用法示例。
在下文中一共展示了Properties.equalsDict方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testWhitespace3
# 需要导入模块: from properties import Properties [as 别名]
# 或者: from properties.Properties import equalsDict [as 别名]
def testWhitespace3(self):
lb = LineBuffer()
lb.append("x=42\n")
dict = { "x" : "42" }
p = Properties()
p.load(lb)
self.assertTrue(p.equalsDict(dict))
示例2: testEscape1
# 需要导入模块: from properties import Properties [as 别名]
# 或者: from properties.Properties import equalsDict [as 别名]
def testEscape1(self):
lb = LineBuffer()
lb.append("x=4\\t2\n")
dict = { "x" : "4\t2" }
p = Properties()
p.load(lb)
self.assertTrue(p.equalsDict(dict))
示例3: testEmptyProperty3
# 需要导入模块: from properties import Properties [as 别名]
# 或者: from properties.Properties import equalsDict [as 别名]
def testEmptyProperty3(self):
lb = LineBuffer()
lb.append("x= \n")
dict = { "x" : "" }
p = Properties()
p.load(lb)
self.assertTrue(p.equalsDict(dict))
示例4: testKeyEscape2
# 需要导入模块: from properties import Properties [as 别名]
# 或者: from properties.Properties import equalsDict [as 别名]
def testKeyEscape2(self):
lb = LineBuffer()
lb.append("x\\ y=42\n")
dict = { "x y" : "42" }
p = Properties()
p.load(lb)
self.assertTrue(p.equalsDict(dict))
示例5: testLineContinue
# 需要导入模块: from properties import Properties [as 别名]
# 或者: from properties.Properties import equalsDict [as 别名]
def testLineContinue(self):
lb = LineBuffer()
lb.append("x=42 \\\n")
lb.append(" boo\n")
dict = { "x" : "42 boo" }
p = Properties()
p.load(lb)
self.assertTrue(p.equalsDict(dict))
示例6: testOverwrite
# 需要导入模块: from properties import Properties [as 别名]
# 或者: from properties.Properties import equalsDict [as 别名]
def testOverwrite(self):
lb = LineBuffer()
lb.append("x=42\n")
lb.append("x=44\n")
dict = { "x" : "44" }
p = Properties()
p.load(lb)
self.assertTrue(p.equalsDict(dict))
示例7: testIgnoreBlanks
# 需要导入模块: from properties import Properties [as 别名]
# 或者: from properties.Properties import equalsDict [as 别名]
def testIgnoreBlanks(self):
lb = LineBuffer()
lb.append("\n")
lb.append("x=42\n")
lb.append(" \n")
lb.append(" # comment\n")
dict = { "x" : "42" }
p = Properties()
p.load(lb)
self.assertTrue(p.equalsDict(dict))