Fix results.json only contains result of last test.
Fix old Python syntax.