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

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.4.tar.gz (12.8 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.4-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytest_grader-0.1.4.tar.gz
  • Upload date:
  • Size: 12.8 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.4.tar.gz
Algorithm Hash digest
SHA256 1f11b6d32c2433e693a0fd1792d82ed362d84e98e3e1a63f4e9434980e95f1c3
MD5 faf90a81949c9e010c8ec289c92e6707
BLAKE2b-256 acca5c3542557410f0f41b2b7e764b8d9f00737af0eab72badb2ee016a12d3bc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytest_grader-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e6748c352f2b6cbac06a10f13b2dd6a1dd5b1b7912b9ae9508a52f9ce02a8ae7
MD5 0e0042d67ef97b99f08b86df79b0c637
BLAKE2b-256 94d9ce0a52f277c194ab71b9acbde159907ab16da5a8b05eb72b90978f90f024

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