Clone and navigate into the repo:
git clone https://github.com/ajtran303/bball-stats.git
cd bball-stats
There should be 21 passing tests:
python3 -m unittest
I have tests for my functions that make stats, clean data, and balance teams. I do not have testa for the "view logic" in my dunder main statement. I would need to learn about mocking and stubbing user input in order to test those. For now I'm okay with testing the "implementation logic".
- Activate a virtual environment to install the
coverage
package:
python3 -m venv .venv/
source .venv/bin/activate
pip install -r requirements.txt
- Generate the report and it should show 100% coverage on
application.py
:
coverage run -m unittest && coverage report
- When you are done, deactivate and remove your virtual environment.
deactivate && rm -rf .venv/
From the command line:
python3 application.py
Navigate through the main menu by selecting an option:
Welcome to the Basketball Stats tool!
MAIN MENU
1) Display Team Stats
2) Quit
Enter an option:
_
Next, you will be prompted to select a team:
SELECT TEAM:
1) Panthers
2) Bandits
3) Warriors
Enter an option:
_
Selecting a valid option will display that team's statistics:
- Total Players
- Total Experienced Players
- Total Inexperienced Players
- Average Height of Players
- Names of Players
- Names of Guardians of Players
Selecting a non-valid option will prompt you to pick again!
Select option 2
at the MAIN MENU
.
Or use the keyboard shortcut <control>+C
to immediately quit.