Tests that come with pyfrc¶
pyfrc comes with testing functions that can be used to test basic functionality of just about any robot, including running through a simulated practice match.
These generic test modules can be applied to wpilib.IterativeRobot
and wpilib.SampleRobot
based robots.
The primary purpose of these tests is to run through your code and make sure that it doesn’t crash. If you actually want to test your code, you need to write your own custom tests to tease out the edge cases.
To use these, add the following to a python file in your tests directory:
from pyfrc.tests import *
Docstring tests¶
- pyfrc.tests.docstring_test.ignore_object(o, robot_path)[source]¶
Returns true if the object can be ignored
- pyfrc.tests.docstring_test.pedantic_docstrings = True¶
If you want to be really pedantic, enforce sphinx docstrings. Ha.