Skip to content

Commit 4d72e4b

Browse files
authored
Merge pull request #219 from robotpy/integrated-testing
Move core functionality from pyfrc into wpilib
2 parents cf2a3b1 + 65b9b03 commit 4d72e4b

File tree

19 files changed

+1626
-42
lines changed

19 files changed

+1626
-42
lines changed

.github/workflows/dist.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ jobs:
131131
- "macos-14" # arm64
132132
- "windows-2022"
133133
python_version:
134-
- '3.10'
135134
- '3.11'
136135
- '3.12'
137136
- '3.13'

devtools/subproject.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
import shutil
33
import sys
44
import tempfile
5+
import tomllib
56
import typing as T
67

78
from packaging.requirements import Requirement
8-
import tomli
99

1010
from .config import SubprojectConfig
1111
from .util import run_cmd
@@ -24,9 +24,9 @@ def __init__(
2424
self.pyproject_path = self.path / "pyproject.toml"
2525
self.name = path.name
2626

27-
# Use tomli here because it's faster and we just need the data
27+
# Use tomllib here because it's faster and we just need the data
2828
with open(self.pyproject_path, "rb") as fp:
29-
self.pyproject_data = tomli.load(fp)
29+
self.pyproject_data = tomllib.load(fp)
3030

3131
self.build_requires = [
3232
Requirement(req) for req in self.pyproject_data["build-system"]["requires"]

rdev_requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ click
44
packaging
55
pytest
66
tomlkit
7-
tomli
87
toposort
98
validobj~=1.2
109

subprojects/robotpy-wpilib/pyproject.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,21 @@ dependencies = [
2626
"robotpy-wpimath==2027.0.0a3",
2727
"robotpy-hal==2027.0.0a3",
2828
"pyntcore==2027.0.0a3",
29-
"robotpy-cli~=2027.0.0a1"
29+
"robotpy-cli~=2027.0.0a1",
30+
31+
# For running robot tests
32+
"pytest>=3.9",
33+
"pytest-reraise",
3034
]
3135

3236
[project.urls]
3337
"Source code" = "https://github.com/robotpy/mostrobotpy"
3438

3539
[project.entry-points."robotpy_cli.2027"]
36-
run = "wpilib._impl.start:Main"
40+
add-tests = "wpilib._impl.cli_add_tests:AddTests"
41+
run = "wpilib._impl.cli_run:Main"
42+
sim = "wpilib._impl.cli_sim:RobotSim"
43+
test = "wpilib._impl.cli_test:RobotTest"
3744

3845

3946
[tool.hatch.build.hooks.robotpy]

subprojects/robotpy-wpilib/semiwrap/IterativeRobotBase.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ classes:
1818
wpi::units::second_t:
1919
LoopFunc:
2020
SimulationInit:
21-
internal: true
2221
SimulationPeriodic:
23-
internal: true
2422
DisabledExit:
2523
AutonomousExit:
2624
TeleopExit:

subprojects/robotpy-wpilib/tests/conftest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import wpilib
66
from wpilib.simulation._simulation import _resetWpilibSimulationData
77

8+
pytest_plugins = "pytester"
9+
810

911
@pytest.fixture
1012
def cfg_logging(caplog):

0 commit comments

Comments
 (0)