Open
Description
Right now it's a bit difficult to test that magicbot as a whole does the expected things on each control loop cycle.
There's a few things I'd love to have tests for, like will_reset_to
having the correct side effects observable by robot code (that doesn't override any internals), or that @feedback
gets logged at the appropriate time. But we have no good way to say "run this robot in each mode for some number of seconds" in tests; pyfrc assumes there's only a single robot class.
This problem would disappear if magicbot were to be refactored to have a loopFunc
like wpilib.IterativeRobotBase
, where we could simply intersperse assertions between calls to such a method.