Allow tests to run with nose/pytest. Closes #209.