tests: restore Python 3 compat in test-parseindex2.py

Authored by durin42.

Description

tests: restore Python 3 compat in test-parseindex2.py

I think this was previously getting lucky in Python 3, and would have
stacktraced if something failed. Now that failure messages are eagerly
computed, this turned into a problem.

Differential Revision: https://phab.mercurial-scm.org/D4182