Replace py.test with pytest
Reorder imports according to pep8