Fix tests#370
Conversation
=============================== warnings summary ===============================
.venv/lib/python3.14/site-packages/pyfrc/test_support/controller.py:10
/home/runner/work/pyrebuilt/pyrebuilt/.venv/lib/python3.14/site-packages/pyfrc/test_support/controller.py:10: PytestCollectionWarning: cannot collect test class 'TestController' because it has a __init__ constructor (from: tests/autonomous_test.py)
class TestController:
|
| Filename | Overview |
|---|---|
| tests/autonomous_test.py | Renames the TestController import to RobotTestController (alias) and updates its usage in the type hint to prevent pytest from collecting it as a test class. |
| pyproject.toml | Adds pyfrc>=2026.0.3 as an explicit dev dependency, bumps pytest to >=9.1.1, and adds pyfrc.init_timeout = 3.0 under [tool.robotpy] to increase the robotInit timeout to 3 seconds. |
| uv.lock | Lock file updated to reflect pyfrc 2026.0.3 and pytest 9.1.1 upgrades; robotpy-ctre removed as it is no longer a transitive dependency. |
Sequence Diagram
%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant pytest
participant pyfrc plugin
participant PyFrcPlugin
participant TestController
pytest->>pyfrc plugin: collect tests
pyfrc plugin->>pyfrc plugin: read pyproject.toml\n(pyfrc.init_timeout = 3.0)
pyfrc plugin->>PyFrcPlugin: instantiate(init_timeout=3.0)
pytest->>PyFrcPlugin: control fixture
PyFrcPlugin->>TestController: "TestController(reraise, robot, init_timeout=3.0)"
TestController->>TestController: wait up to 3s for robotInit
TestController-->>pytest: control object
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant pytest
participant pyfrc plugin
participant PyFrcPlugin
participant TestController
pytest->>pyfrc plugin: collect tests
pyfrc plugin->>pyfrc plugin: read pyproject.toml\n(pyfrc.init_timeout = 3.0)
pyfrc plugin->>PyFrcPlugin: instantiate(init_timeout=3.0)
pytest->>PyFrcPlugin: control fixture
PyFrcPlugin->>TestController: "TestController(reraise, robot, init_timeout=3.0)"
TestController->>TestController: wait up to 3s for robotInit
TestController-->>pytest: control object
Reviews (1): Last reviewed commit: "Update to pytest 9.1.1" | Re-trigger Greptile
robotInittimeout to 3 seconds to hopefully address the CI flakiness (e.g. on main https://github.com/thedropbears/pyrebuilt/actions/runs/27670563016/job/81833735442)