Select Git revision
ex_matplotlib.py
Forked from
Derrode Stéphane / INF-TC2
Source project has a limited visibility.
-
Derrode Stéphane authoredDerrode Stéphane authored
test_tas.py 568 B
from Tas import *
if __name__=="__main__":
data = []
with open("etudiants.txt") as f:
keys = None
for line in f:
l = [w.strip() for w in line.split(';')]
if keys is None:
keys = l
else:
data.append({k:v for k, v in zip(keys, l)})
tas = Tas()
for d in data:
tas.ajoute(int(d['moyenne']))
r = tas.get_racine()
fg, fg_i = tas.get_fils_gauche(0)
ffg, ffg_i = tas.get_fils_droit(0)
assert(r == 19 and fg == 14 and ffg == 16)