Use assert instead of unittest + improve presentation on for loops

2 jobs for master in 52 seconds