pep8
pep8
Don't print test profile at process exit.
Reset the flags if the tests crash and fix the test in debug mode.
remove print in tests.
small code simplication.
fix memory leak with allow_gc=False
Merge pull request #1920 from nouiz/fix_tests

Fix tests in buildbot and memory leak with allow_gc=False