fix py3-incompat in test code.
Merge remote-tracking branch 'origin/master'