[copybara] allwpilib to mostrobotpy - #309
Conversation
GitOrigin-RevId: ae765842dd8cc0dd3359ebdd735106f42d13c80d
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c909b667f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # Cleanup WPILib globals | ||
| # -> preferences, SmartDashboard, MotorSafety | ||
| # -> preferences and MotorSafety | ||
| wpilib.simulation._simulation._reset_wpilib_simulation_data() |
There was a problem hiding this comment.
Reset telemetry and tunable registries between robot tests
When a robot fixture publishes a Selectable, command, or getter-backed tunable, the new global tunable registry retains that object (and often its subsystems and HAL resources) after del robot; this teardown no longer clears dashboard state and does not reset either new registry before gc.collect() and the NetworkTables reset. A subsequent test can therefore encounter unreleased HAL handles, duplicate paths that keep the previous robot's value, or backends tied to the reset NT instance. Reset TunableRegistry and TelemetryRegistry before garbage collection and NetworkTables shutdown.
Useful? React with 👍 / 👎.
GitOrigin-RevId: ae765842dd8cc0dd3359ebdd735106f42d13c80d