make the python test case condition same as the python compilation