fixed tests; switched to flake8