Fix test. It wasn't testing what it should.

This was causing a test failure in python 3.3.0, as cmp isn't a
built-in function anymore.
Make the error detection work with python 3.3.

It was making a test crash with python 3.3