Switch from nosetests to pytest