TST: fix doctests & pep8