python 3 compatibility in gen-descriptor-tests.py