Fix test runner for Python 2 and 3

Hopefully for the last time!