python26 compatibility fix

fix format errors
fix unittests
fix tox & travis configs