robotpy / robotpy-wpilib-utilities

Useful utility functions/objects for RobotPy
BSD 3-Clause "New" or "Revised" License
11 stars 19 forks source link

Hotfix magicbot StateMachine tests #199

Closed auscompgeek closed 1 year ago

auscompgeek commented 1 year ago

Running the tests in a random order (using pytest-randomly) causes a different set of tests to fail each time in test_magicbot_sm, indicating there is some global state being kept around and racing.

This changes the tunables component names to be unique between each test to hotfix the tests.

A proper fix would change setup_tunables to accept a NetworkTableInstance to attach tunables to, which we should probably do anyway, but changing these names was an easy and simple fix.