Skip to main content

A Sphinx directive which enables testifying documentation by explicitly referencing test results

Project description

Build

Sphinx-testify

sphinx-testify is an extension to the Sphinx documentation generator, that enables building testified documentation and, ultimately living documentation.

Testified documentation in a nutshell

Testified documentation means that the documentation source references test results, and these references are verified during the build process. As a result, we can keep every paragraph even every sentence of the documentation aligned with the code, as long as there is a test that "testifies" the described behaviour.

A simple example

Imagine you're working on a system access module. Even before writing any tests or code, you can briefly document the expected behavior and reference the (to-be-created) tests. Proceed with a TDD cycle, and once all the tests and implementation are ready, you’ll have testified and living documentation.

Here's how it looks like in a reStructuredText document:

   System access
   =============

   Only a user with valid credentials: a username and a password can access
   the system. If credentials are wrong, the system returns "Authentication failed"
   error message.

   .. testify::
      test_a_user_can_access_system_with_username_and_password
      test_system_returns_authentication_failed_error_when_username_is_not_found
      test_system_returns_authentication_failed_error_when_password_is_wrong

Installation

pip install sphinx-testify

Links

Code: https://github.com/BasicWolf/sphinx-testify
Docs: https://sphinx-testify.readthedocs.io/en/latest/

License

GPLv3

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

sphinx_testify-0.1.1.tar.gz (61.2 kB view details)

Uploaded Source

Built Distribution

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

sphinx_testify-0.1.1-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file sphinx_testify-0.1.1.tar.gz.

File metadata

  • Download URL: sphinx_testify-0.1.1.tar.gz
  • Upload date:
  • Size: 61.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for sphinx_testify-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6b8bbdce54883ff262b8beee2315042938dfa8fa1fbe08c168af347232b1be7c
MD5 45b17d5314df9e06d0f4b2519a40330c
BLAKE2b-256 bc525a882581a912389d2149061ee6c98636b396893efd74bea51d15d554052b

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_testify-0.1.1.tar.gz:

Publisher: ci.yml on BasicWolf/sphinx-testify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sphinx_testify-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sphinx_testify-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for sphinx_testify-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7bb4a299a463d39f46185df98e0be157647c40cc587694c513eebae8524d9ac8
MD5 352ca555e4ff361689847f74e80e8db7
BLAKE2b-256 805eb2e78d3c5ae43277c53f0277c6f769751a6b8fb6498ed28c29182fb1a2c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_testify-0.1.1-py3-none-any.whl:

Publisher: ci.yml on BasicWolf/sphinx-testify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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