mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
[robotpy] Run black on robotpy files (#9017)
This piggy-backs off #8362. `wpiformat` will handle all the non-python files (C++ trailing spaces in yaml files, etc), and the robotpy files (guarded by being under src/main/python or src/test/python) will be handled by black only.
This commit is contained in:
@@ -3,7 +3,6 @@ import pytest
|
||||
from wpilib import DriverStation, DriverStationBackend, GenericHID
|
||||
from wpilib.simulation import DriverStationSim, GenericHIDSim
|
||||
|
||||
|
||||
RumbleType = GenericHID.RumbleType
|
||||
RUMBLE_TYPES = (
|
||||
RumbleType.LEFT_RUMBLE,
|
||||
@@ -30,9 +29,7 @@ def test_rumble_range() -> None:
|
||||
|
||||
for rumble_type in RUMBLE_TYPES:
|
||||
hid.setRumble(rumble_type, rumble_value)
|
||||
assert sim.getRumble(rumble_type) == pytest.approx(
|
||||
rumble_value, abs=0.0001
|
||||
)
|
||||
assert sim.getRumble(rumble_type) == pytest.approx(rumble_value, abs=0.0001)
|
||||
|
||||
|
||||
def test_rumble_types() -> None:
|
||||
@@ -50,9 +47,7 @@ def test_rumble_types() -> None:
|
||||
|
||||
for rumble_type in RUMBLE_TYPES:
|
||||
expected = 1 if rumble_type == active_rumble_type else 0
|
||||
assert sim.getRumble(rumble_type) == pytest.approx(
|
||||
expected, abs=0.0001
|
||||
)
|
||||
assert sim.getRumble(rumble_type) == pytest.approx(expected, abs=0.0001)
|
||||
|
||||
hid.setRumble(active_rumble_type, 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user