add an assert to the test, and fix it for python3