Commit 0a241718 authored by Guillaume CLOCHARD's avatar Guillaume CLOCHARD
Browse files

Test algo_cfop() : tests tous les cube

Et afficher les cubes qui posent problème
parent 20415cab
......@@ -27,12 +27,23 @@ class TestAlgo(unittest.TestCase):
with open(JEU_TEST) as data_file: #on parse le jeu de test JSON
data = json.load(data_file)
cubes = extract_cubes(data) #1140 cubes
error = False
bugs = []
for cube in cubes:
err, c = lecture_cube(cube)
if err:
raise Error("Erreur lecture_cube \n" + cube)
err = algo_cfop(c)[0]
if err:
error = True
self.assertFalse(error, "Certains cubes ne sont pas résolus")
if error:
for b in bugs:
print(b, "\n")
if __name__ == "__main__":
Markdown is supported
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