Ajout d'un fichier de test avec pytest

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
2021-01-26 17:07:12 +01:00
parent 9026dd56cc
commit d4d595ed68
3 changed files with 31 additions and 3 deletions

8
main.py Normal file → Executable file
View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""
Ce script est utilisé en guise d'appui pour le séminaire Crans d'introduction
@ -24,7 +24,11 @@ def main():
while True:
command = input("> ")
args = command.split(" ")
print(globals()[args[0]](*args[1:]))
print(commande(args[0], *args[1:]))
def commande(name: str, *args):
return globals()[name](*args)
def aide():