Quote:
Originally Posted by Jeanne Boyarsky
What tool did you use for the test program? I was thinking about py_compile, but that doesn't look like it checks method signatures for correctness.
|
We actually didn't use a tool, I just created a file called 'test.py', imported robot.py, and ran the program like the cRio would.
We have print statements sprinkled throughout the program, so we just verified the operation of the program manually -- and honestly, the biggest thing I was worried about was accidentally throwing an exception because of a syntax error, so the actual results didn't always matter to us -- just the fact that it ran all the way through our autonomous routine and a few rounds of operator control was good enough for me.
Of course, we also had a lot of things like the following sprinkled throughout our main loop too, just in case we missed something...
Code:
try:
# call some complicated function in another module
except:
# swallow any exceptions if we're in a real match...
if not wpilib.DriverStation.GetInstance().IsFMSAttached():
raise