Skip to content
Back to top
View this page

# Sybil

CI Docs

This library provides a way to check examples in your code and documentation by parsing them from their source and evaluating the parsed examples as part of your normal test run. Integration is provided for the main Python test runners.

Sybil comes with an array of included parsers, including ones for `doctest` and `code-block` examples, and is designed so that it’s easy to provide your own additional parsers.

- Quickstart
- Usage
  - Test runner integration
  - Parsers
- Patterns of Use
  - Documentation and source examples in Restructured Text
  - Documentation in MyST and source examples in Restructured Text
  - Linting and checking examples
  - Migrating from sphinx.ext.doctest
- Test Runners
  - pytest
    - Run example tests
  - unittest
- ReST Parsers
  - doctest
  - Code blocks
    - Python
    - Other languages
  - Capturing blocks
  - Skipping examples
  - Clearing the namespace
- Markdown Parsers
  - doctest
  - Code blocks
    - Python
    - Other languages
  - Skipping examples
  - Clearing the namespace
- MyST Parsers
  - doctest
    - `doctest` directive
    - `eval-rst` directive
    - Floating point numbers
  - Code blocks
    - Python
    - Other languages
  - Skipping examples
  - Clearing the namespace
- Developing Parsers
  - Worked example
  - Developing with Lexers

- Concepts
- API Reference
- Development
- Changes
- License

# Why Sybil?

Sybil is heavily inspired by Manuel, which was named after a Fawlty Towers character, and so it seemed only right to pick another Fawlty Towers character name for this library.

# Indices and tables

- Index

- Module Index

- Search Page