New test code for python 3 support