autopep8
python3 compatible
fixed python2.7 test