Commit 879a7ef4 authored by Louis's avatar Louis
Browse files

[WIP][testexo] Command `lsexos` also lists level, so that its output uniquely identify an exercise.

This is quite broken, since some exercices appear twice, and will be
solved when `match_exercise` yields tuples `(level, exo)` and not only
parent 3e5c1405
......@@ -254,9 +254,14 @@ def do_lsexos(__options):
def iter_names():
for exo in match_exercise():
if issubclass(exo, pyromaths.ex.LegacyExercise):
yield exo.function[0].__name__
name = exo.function[0].__name__
elif issubclass(exo, pyromaths.ex.TexExercise):
yield exo.__name__
name = exo.__name__
for level in exo.level:
yield u"{}.{}".format(
for name in sorted(iter_names()):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment