Skip to content
Snippets Groups Projects
Select Git revision
  • 9407c0e2148af1988579988dd87f2e39133a696d
  • master default protected
  • vS5_2020-2021
3 results

ex_matplotlib.py

Blame
  • Forked from Derrode Stéphane / INF-TC2
    Source project has a limited visibility.
    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)