solve unittest bugs and undetected develop_steps bug
This commit is contained in:
@@ -256,13 +256,19 @@ class Expression(Explicable):
|
||||
for t in tokenList:
|
||||
try:
|
||||
with Expression.tmp_render():
|
||||
tmp_steps.append([i for i in t.explain()])
|
||||
steps = [i for i in t.explain()]
|
||||
if steps:
|
||||
tmp_steps.append(steps)
|
||||
else:
|
||||
tmp_steps.append([t])
|
||||
except AttributeError:
|
||||
tmp_steps.append([t])
|
||||
|
||||
if max([len(i) for i in tmp_steps]) == 1:
|
||||
# Cas où rien n'a dû être expliqué.
|
||||
return []
|
||||
elif min([len(i) for i in tmp_steps]) == 0:
|
||||
raise ValueError('tmp_steps: {} \ntokenList: {}'.format(tmp_steps, tokenList))
|
||||
else:
|
||||
tmp_steps = expand_list(tmp_steps)[:-1]
|
||||
steps = [Expression(s) for s in tmp_steps]
|
||||
|
||||
Reference in New Issue
Block a user