Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Fix unit tests and be verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
KenwoodFox committed Jan 9, 2024
1 parent eddf669 commit 46aaea0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/robot-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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() }}
Expand Down
7 changes: 1 addition & 6 deletions rio/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand All @@ -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)
3 changes: 2 additions & 1 deletion rio/robotcontainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions rio/tests/pyfrc_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 46aaea0

Please sign in to comment.