Correct py3 check in test