Fixes to support parametric tests

Our parametric tests weren't running on either Python 2 or 3, for different reasons. This fixes both issues, so some test failures may appear as we exercise code that hasn't been tested recently.

For Python 2, this works around nose-devs/nose#728, which I just filed. On Python 3, I think the parametric testing machinery has always been broken. The fix is horrendously ugly, but seems to do the trick.

I am about to propose getting rid of our parametric test system, as it has failed too often and too quietly.