[robotpy] Sync robotpy (#8318)

Project import generated by Copybara.

GitOrigin-RevId: f6818c55dda55da1226e47a05a22d30f7cc477f1
This commit is contained in:
PJ Reiniger
2025-11-01 13:28:05 -04:00
committed by GitHub
parent 3f88c287d6
commit 49e84c6b52
51 changed files with 226 additions and 285 deletions

View File

@@ -4,8 +4,6 @@
# works correctly
#
from __future__ import print_function
import pytest
import logging

View File

@@ -27,7 +27,7 @@ from ntcore.util import ntproperty, ChooserControl
def test_ntproperty(nt: NetworkTableInstance):
class Foo(object):
class Foo:
robotTime = ntproperty(
"/SmartDashboard/robotTime", 0.0, writeDefault=False, inst=nt
)
@@ -85,14 +85,14 @@ def test_ntproperty(nt: NetworkTableInstance):
def test_ntproperty_emptyarray(nt: NetworkTableInstance):
with pytest.raises(TypeError):
class Foo1(object):
class Foo1:
testArray = ntproperty(
"/SmartDashboard/testArray", [], writeDefault=True, inst=nt
)
with pytest.raises(TypeError):
class Foo2(object):
class Foo2:
testArray = ntproperty(
"/SmartDashboard/testArray", [], writeDefault=False, inst=nt
)
@@ -106,7 +106,7 @@ def test_ntproperty_multitest(nt: NetworkTableInstance):
pyfrc tests
"""
class Foo(object):
class Foo:
robotTime = ntproperty(
"/SmartDashboard/robotTime", 0.0, writeDefault=False, inst=nt
)