We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07ba9aa commit fab60deCopy full SHA for fab60de
pyfrc/test_support/pytest_plugin.py
@@ -54,6 +54,8 @@ def robotInit(self):
54
self._robot_file = robot_file
55
self._robot_class = TestRobot
56
57
+ self._physics = physics
58
+
59
if physics:
60
physics.log_init_errors = False
61
@@ -100,6 +102,11 @@ def robot(self):
100
102
# Tests only get a proxy to ensure cleanup is more reliable
101
103
yield weakref.proxy(robot)
104
105
+ # reset engine to ensure it gets cleaned up too
106
+ # -> might be holding wpilib objects, or the robot
107
+ if self._physics:
108
+ self._physics.engine = None
109
110
del robot
111
112
# Double-check all objects are destroyed so that HAL handles are released
0 commit comments