Python3 compatibility of tests