Fix py3k tests

Closes #274