Skip to content

okpy/pytest-grader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
  • Test Locking as described in Basu et al., Automated Problem Clarification at Scale (abstract, pdf)
    • Lock doctests using the # LOCK comment before the function.
    • 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.
  • 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.

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 build
  • python -m twine upload dist/*

About

A pytest plugin for assignment scoring.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages