diff --git a/.github/workflows/robot-workflow.yml b/.github/workflows/robot-workflow.yml index 1a5d4fa5..51dd6bff 100644 --- a/.github/workflows/robot-workflow.yml +++ b/.github/workflows/robot-workflow.yml @@ -100,7 +100,7 @@ jobs: - name: Run unit tests run: | - cd rio && pipenv run python -m robotpy test || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; fi + cd rio && pipenv run python -m robotpy test -- -vs || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; fi - name: Discord notification if: ${{ failure() }} diff --git a/rio/robot.py b/rio/robot.py index ff197dca..132a3cbe 100644 --- a/rio/robot.py +++ b/rio/robot.py @@ -65,7 +65,7 @@ def autonomousInit(self) -> None: if self.autonomousCommand is not None: self.autonomousCommand.schedule() else: - print("no auto command?") + logging.warning("no auto command?") def autonomousPeriodic(self) -> None: """This function is called periodically during autonomous""" @@ -76,8 +76,3 @@ def teleopPeriodic(self) -> None: def testInit(self) -> None: # Cancels all running commands at the start of test mode commands2.CommandScheduler.getInstance().cancelAll() - - -# When starting from here (and running as-is) -if __name__ == "__main__": - wpilib.run(UnnamedToaster) diff --git a/rio/robotcontainer.py b/rio/robotcontainer.py index 0e3bc6b7..c0d5d4ac 100644 --- a/rio/robotcontainer.py +++ b/rio/robotcontainer.py @@ -104,4 +104,5 @@ def getAutonomousCommand(self) -> commands2.Command: Use this to pass the autonomous command to the main :class:`.Robot` class. :returns: the command to run in autonomous """ - return self.autoChooser.getSelected() + # return self.autoChooser.getSelected() + return None diff --git a/rio/tests/pyfrc_test.py b/rio/tests/pyfrc_test.py index 7c6cfc9e..55ee6b49 100644 --- a/rio/tests/pyfrc_test.py +++ b/rio/tests/pyfrc_test.py @@ -10,8 +10,8 @@ from subsystems.drivesubsystem import DriveSubsystem -# def test_yaml(): -# assert len(getConstants("robot_controls")) > 0 +def test_yaml(): + assert len(getConstants("robot_controls")) > 0 def test_nothing():