示例#1
0
 def test_simple_value(self):
     config = ConfigNode({})
     compare(config.get('foo', 1), expected=1)
示例#2
0
 def test_get_list_number_key(self):
     config = ConfigNode([1])
     compare(config.get(0), expected=1)
示例#3
0
 def test_get_list_string_key(self):
     config = ConfigNode([1])
     compare(config.get('foo'), expected=None)
示例#4
0
 def test_get(self):
     config = ConfigNode({'foo': 1})
     compare(config.get('foo'), expected=1)
示例#5
0
 def test_get_default_default(self):
     config = ConfigNode({})
     compare(config.get('foo'), expected=None)
示例#6
0
 def test_simple_value(self):
     config = ConfigNode({})
     compare(config.get('foo', 1), expected=1)
示例#7
0
 def test_name_clash_with_real_attrs(self):
     # method, data, __method
     config = ConfigNode({'get': 1})
     compare(config.get('get'), expected=1)
示例#8
0
 def test_get_list_string_key(self):
     config = ConfigNode([1])
     compare(config.get('foo'), expected=None)
示例#9
0
 def test_get_list_number_key(self):
     config = ConfigNode([1])
     compare(config.get(0), expected=1)
示例#10
0
 def test_get_default_default(self):
     config = ConfigNode({})
     compare(config.get('foo'), expected=None)
示例#11
0
 def test_get(self):
     config = ConfigNode({'foo': 1})
     compare(config.get('foo'), expected=1)
示例#12
0
 def test_name_clash_with_real_attrs(self):
     # method, data, __method
     config = ConfigNode({'get': 1})
     compare(config.get('get'), expected=1)