fix python 3 tests
lint code