Pytest extension for scoring programming assignments.
Project description
pytest-grader
A pytest plugin for testing and scoring programming assignments.
Features
- 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
# LOCKcomment before the function. python3 pytest-grader --lock [src] [dest]will generate a copy of src with doctests locked.pytest --unlockprovides 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
Usage
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.
License
A permissive license will be chosen shortly...
Updating versions
- Change version in
pyproject.toml python -m buildpython -m twine upload dist/*
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest_grader-0.1.3.tar.gz.
File metadata
- Download URL: pytest_grader-0.1.3.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02cac9db9bb0c5c8e888e6e0be1911389f68d42bd42b629ceae1f678a2f123d2
|
|
| MD5 |
96b8f784546a703bf59c25e44d74b01b
|
|
| BLAKE2b-256 |
e9a640564785f5d4d64ee49d08e2d33afee2a66c1b9213b85771f16615d1d047
|
File details
Details for the file pytest_grader-0.1.3-py3-none-any.whl.
File metadata
- Download URL: pytest_grader-0.1.3-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f8f1c801e7cab6a5cbb4fdd45cfef973d2fcdb3a908585db78df2c1f2e2d211
|
|
| MD5 |
60c5a703643382962b9f3904bfcc6481
|
|
| BLAKE2b-256 |
4f61774728c50b8a596772c39575752a0f61d220169b9f9ce6431c1d2e6f283a
|