python test code