add python 3 check in resources and fixed tests