Partial fix for test failures, works on py2.x
Debugging on tests