Work around python 3.4 2to3 conversion bug.
More error information.
small test simplification.
Fix test in python 3
fix test crash just introduced.
Merge pull request #1813 from nouiz/assert_

Fix tests in python3.