23 lines
520 B
Python
Executable File
23 lines
520 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
"""
|
|
Exécution des tests du script.
|
|
"""
|
|
|
|
import main
|
|
|
|
|
|
def test_aide():
|
|
"""
|
|
On essaie d'afficher l'aide, et on vérifie si ça affiche la bonne chose.
|
|
"""
|
|
res = main.commande("aide")
|
|
lines = res.split("\n")
|
|
assert len(lines) == 6
|
|
assert lines[0].startswith("aide")
|
|
assert lines[1].startswith("seminaire")
|
|
assert lines[2].startswith("blague")
|
|
assert lines[3].startswith("calcul")
|
|
assert lines[4].startswith("tri")
|
|
assert lines[5].startswith("stop")
|