This repository implements at least partial solutions to most of the labs in introduction to programming, as well as pytest
unit tests.
Author: Tom Magnusson - tommagnuss@gmail.com
Advisor: Brian Gormanly, Marist College Faculty
Link to the post presented at the honors thesis exhibit.
Dependencies:
- Python 3
pytest
Included in each lab folder is a README.md
which explains how my testing contributes to the labs, or an explanation of why there are not tests if that is the case.
Run program.py
's test in labN
folder:
pytest labN/program_test.py
Run all tests:
pytest
Lab 4 (account generator) and Lab 7 (tic tac toe) are two excellent candidates for testing.
Lab 4's README.md
explains a recommended testing paradigm called Given-When-Then.
Lab 7 include lots of tests that clearly demonstrate why manual testing would be way slower than writing unit tests.
- Official Documentation
- Excellent two part series on Pytest and good unit testing practices