A pytest plugin for testing and scoring programming assignments.
- Assignment Scoring
- Add point values to test functions using the
@points(n)
decorator - Show a score summary when running
pytest --score
- Add point values to test functions using the
- Test Locking as described in Basu et al., Automated Problem Clarification at Scale (abstract, pdf)
- Lock doctests using the
@lock
decorator. python3 pytest-grader --lock [src] [dest]
will generate a copy of src with doctests locked.pytest --unlock
provides an interactive interface for unlocking locked doctests.
- Lock doctests using the
- Progress Logging
- Snapshots of assignment files, test case results, and unlocking attempts are stored in a
grader.sqlite
. - This file is designed to be submitted along with the assignment as a record of how the assignment was completed.
- Snapshots of assignment files, test case results, and unlocking attempts are stored in a
- Coming soon: AI assistance
The recommended way to use this pytest plugin is to include pytest-grader
(Link coming soon) in the distribution of your assignment.
Coming soon: It is also possible to install this with:
pip install pytest-grader
Also include a conftest.py
file in the distribution of your assignment that contains pytest_plugins = ["pytest_grader"]
.
See the examples
directory for more usage info.
A permissive license will be chosen shortly...