Fixed test for Python 3 to a more sensible alternative.