test_mod => test_mode2
This commit is contained in:
parent
f47cc02d3e
commit
9da87804c2
|
@ -31,6 +31,7 @@ def error_to_str(dico):
|
|||
return dico
|
||||
|
||||
|
||||
# config.option().value.dict()
|
||||
def test_dict():
|
||||
debug = False
|
||||
# debug = True
|
||||
|
@ -52,6 +53,7 @@ def test_dict():
|
|||
assert error_to_str(dico) == error_to_str(config.value.dict())
|
||||
|
||||
|
||||
# config.option().value.get()
|
||||
def test_get():
|
||||
debug = False
|
||||
# debug = True
|
||||
|
@ -78,6 +80,7 @@ def test_get():
|
|||
assert value == config.option(key).value.get()
|
||||
|
||||
|
||||
# config.option().owner.get()
|
||||
def test_owner():
|
||||
debug = False
|
||||
# debug = True
|
||||
|
@ -106,6 +109,7 @@ def test_owner():
|
|||
assert value == {'null': config.option(key).owner.get()}
|
||||
|
||||
|
||||
# config.option().property.get()
|
||||
def test_prop():
|
||||
debug = False
|
||||
# debug = True
|
||||
|
@ -140,10 +144,13 @@ def test_prop():
|
|||
assert value == props
|
||||
|
||||
|
||||
# config.option().property.get(True)
|
||||
def test_prop2():
|
||||
debug = False
|
||||
# debug = True
|
||||
for filename in list_data():
|
||||
if debug:
|
||||
print(filename)
|
||||
with open(filename, 'r') as fh:
|
||||
json = loads(fh.read())
|
||||
config = Config(json)
|
||||
|
@ -186,7 +193,7 @@ def test_info():
|
|||
|
||||
def test_mod():
|
||||
debug = False
|
||||
debug = True
|
||||
# debug = True
|
||||
i = 0
|
||||
while True:
|
||||
i += 1
|
||||
|
@ -227,7 +234,7 @@ def test_mod():
|
|||
assert dico1 == config.value.dict()
|
||||
|
||||
|
||||
def test_mod():
|
||||
def test_mod2():
|
||||
debug = False
|
||||
# debug = True
|
||||
i = 0
|
||||
|
|
|
@ -244,7 +244,7 @@ class TiramisuOptionValue(_Value):
|
|||
self._display_warnings(self.path, value, self.schema['type'], self.schema['name'])
|
||||
return value
|
||||
if self.index is not None:
|
||||
raise APIError(_('index must be only with a follower option, not for "{}"').format(self.path))
|
||||
raise APIError(_('index must only be set with a follower option, not for "{}"').format(self.path))
|
||||
value = self.config.get_value(self.path)
|
||||
self._display_warnings(self.path, value, self.schema['type'], self.schema['name'])
|
||||
return value
|
||||
|
|
Loading…
Reference in New Issue