Skip to content

Commit a9ea29c

Browse files
committed
Update tests and dependencies
1 parent c1e9733 commit a9ea29c

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

.github/workflows/dist.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
ci:
14-
uses: robotpy/build-actions/.github/workflows/package-pure.yml@v2022
14+
uses: robotpy/build-actions/.github/workflows/package-pure.yml@v2023
1515
with:
1616
enable_sphinx_check: false
1717
secrets:

pyfrc/test_support/pytest_plugin.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import hal
1010
import hal.simulation
11-
import networktables
11+
import ntcore
1212
import wpilib
1313
from wpilib.simulation import DriverStationSim, pauseTiming, restartTiming
1414
import wpilib.simulation
@@ -87,7 +87,8 @@ def robot(self):
8787
# bubble up to the user
8888
#
8989

90-
networktables.NetworkTables.startLocal()
90+
nt_inst = ntcore.NetworkTableInstance.getDefault()
91+
nt_inst.startLocal()
9192

9293
pauseTiming()
9394
restartTiming()
@@ -107,6 +108,9 @@ def robot(self):
107108
if self._physics:
108109
self._physics.engine = None
109110

111+
# HACK: avoid motor safety deadlock
112+
wpilib.simulation._simulation._resetMotorSafety()
113+
110114
del robot
111115

112116
# Double-check all objects are destroyed so that HAL handles are released
@@ -119,7 +123,7 @@ def robot(self):
119123
# -> some reset functions will re-register listeners, so it's important
120124
# to do this before so that the listeners are active on the current
121125
# NetworkTables instance
122-
networktables.NetworkTables.stopLocal()
126+
nt_inst.stopLocal()
123127

124128
# Cleanup WPILib globals
125129
# -> preferences, SmartDashboard, LiveWindow, MotorSafety
@@ -133,7 +137,7 @@ def robot(self):
133137
hal.simulation.resetGlobalHandles()
134138

135139
# Reset the HAL data
136-
hal.simulation.resetAllData()
140+
hal.simulation.resetAllSimData()
137141

138142
# Don't call HAL shutdown! This is only used to cleanup HAL extensions,
139143
# and functions will only be called the first time (unless re-registered)

setup.cfg

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ install_requires =
3333
pint>=0.11.0
3434
importlib-metadata; python_version < '3.8'
3535

36-
robotpy-wpiutil>=2022.4.1.1,<2023
37-
pyntcore>=2022,<2023
38-
robotpy-hal>=2022.4.1.1,<2023
39-
wpilib>=2022.4.1.1,<2023
36+
robotpy-wpiutil>=2023.0.0b3.post1,<2024
37+
pyntcore>=2023.0.0b3,<2024
38+
robotpy-hal>=2023.0.0b3.post1,<2024
39+
wpilib>=2023.0.0b3,<2024
4040

41-
robotpy-installer>=2022,<2023
41+
robotpy-installer>=2023.0.0b3,<2024
4242
setup_requires =
4343
setuptools_scm > 6
4444
python_requires = >=3.6

0 commit comments

Comments
 (0)