Description
The tests/ directory exists, but many mini-projects lack proper test coverage. A robust project needs automated tests to ensure scripts don't break as new features are added.
Implementation
- Add
pytest to requirements.txt.
- Write unit tests for core logical components of the scripts in the
math/ and utilities/ folders (e.g., testing the expression evaluator, or string manipulation utilities).
- Use
unittest.mock to mock network calls or file I/O operations.
- Configure a coverage tool (
pytest-cov) to generate a test coverage report, aiming for >80% on tested modules.
Level: Critical
Affected Files: tests/, requirements.txt
Description
The
tests/directory exists, but many mini-projects lack proper test coverage. A robust project needs automated tests to ensure scripts don't break as new features are added.Implementation
pytesttorequirements.txt.math/andutilities/folders (e.g., testing the expression evaluator, or string manipulation utilities).unittest.mockto mock network calls or file I/O operations.pytest-cov) to generate a test coverage report, aiming for >80% on tested modules.Level: Critical
Affected Files:
tests/,requirements.txt