I have a script LCP_02.py with the if statement:
if __name__ == "__testcase__" or __name__ == "__main__":
ask_costsurfacepath_path()
ask_outputpath_path()
CostSurfacefn = config.costsurfacepath
startCoord = (config.startX,config.startY)
stopCoord = (config.stopX,config.stopY)
outputPathfn = config.outputpath
main(CostSurfacefn,outputPathfn,startCoord,stopCoord)
when I run testcase.py (below) in the shell, it doesn't run the LCP_02 script:
import config
import LCP_02
if __name__ == "__main__":
config.startX = 356254.432
config.startY = 5325191.299
config.stopX = 346200.101
config.stopY = 5301688.499
LCP_02
All the functions in LCP_02 have print statements (as a visual). But when running testcase.py, they are not printed. The program starts, waits around 2 seconds, and then shows the >>> in the shell.