Skip to content

Commit 6c0aa5c

Browse files
committed
Clean up.
Signed-off-by: Mike Stitt <[email protected]>
1 parent a7f332f commit 6c0aa5c

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

subprojects/robotpy-wpilib/tests/test_timedrobot.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,7 @@ def _robotThread(self, robot: TimedRobotPy) -> None:
109109
robot._TestRobot__robotInitStarted = self._onRobotInitStarted
110110

111111
try:
112-
print("about to:robot.startCompetition()",flush=True)
113112
robot.startCompetition()
114-
print("after robot.startCompetition()",flush=True)
115113
self._startCompetitionReturned = True
116114

117115
except Exception as e:
@@ -180,7 +178,6 @@ def runRobot(self) -> None:
180178
# Rethrow the exception to propagate it up the call stack
181179
raise
182180
finally:
183-
print("Reached self._robotFinished", flush=True)
184181
self._robotFinished = True
185182
robot.endCompetition()
186183

@@ -209,15 +206,11 @@ def runRobot(self) -> None:
209206
pytest.fail("robot did not exit within 2 seconds")
210207

211208
if not self._expectFinished:
212-
print(f"not self._expectFinished: self._reraise.exception={self._reraise.exception}")
213209
assert type(self._reraise.reset()) is AssertionError
214210

215211
self._thread = None
216212

217-
#TODO the test harness captures the expected exceptions and does not raise them
218-
# so expected failures causes self._startCompetitionReturned even though they
219-
# would not outside of the test harness.
220-
#assert self._expectFinished == self._startCompetitionReturned
213+
assert self._expectFinished == self._startCompetitionReturned
221214

222215
@property
223216
def robotIsAlive(self) -> bool:

subprojects/robotpy-wpilib/wpilib/timedrobotpy.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import traceback
21
from sys import argv
32
from typing import Any, Callable, Iterable, ClassVar
43
from heapq import heappush, heappop, _siftup
@@ -260,7 +259,6 @@ def startCompetition(self) -> None:
260259
while self._bodyOfMainLoop():
261260
pass
262261
finally:
263-
print("Reached after finally: self._stopNotifier(): ", flush=True)
264262
# pytests hang on PC when we don't force a call to self._stopNotifier()
265263
self._stopNotifier()
266264

0 commit comments

Comments
 (0)