Skip to main content

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
  • 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.
  • 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/*

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

pytest_grader-0.1.2.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_grader-0.1.2-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file pytest_grader-0.1.2.tar.gz.

File metadata

  • Download URL: pytest_grader-0.1.2.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for pytest_grader-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9d43da33cd424d4a41f94634a33ac7dc59c1c0057ddfb8a6fd02012304cd83d8
MD5 aafc5c5be434b3562956864628fad59b
BLAKE2b-256 4d6c7371c64b25050fd42d1894dcae62b19640208893de252b175db767e13744

See more details on using hashes here.

File details

Details for the file pytest_grader-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pytest_grader-0.1.2-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

Hashes for pytest_grader-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a5ba0e84e65e0c8ce28fae6760ea6f51fdd95400dcd924314a0ee9c0896b23b9
MD5 9420a0e27c6d4e45f51f28656b4a74f7
BLAKE2b-256 49b5ad33ea9d41dfdb6ff54821a4e4650ef3cf99b19bf94b6139457313aea637

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page