Skip to content

Docs: code blocks arent tested #162

Description

@euri10

Summary

code-block are not tested, moving them to self-contained python files in docs/examples and referencing them using literalinclude should be better.

list of rst to be changed (run this in docs : grep -rl --include="*.rst" ".. code-block:: python" .):

those are rst files that arent going to be needed

- [ ] ./changelog.rst

for each sub-issue you would do the following:

  • move the code-block inside a python file in the relevant directory inside docs/example, the file name should be test_something_x where x is the index of the code-block inside the rst you're modifying.
  • write a simple test that ensure the code block is effectiveley tested
  • reference it thanks to literalinclude using lines to just show the code-block part (and dedent if necessary so that it shows up properly, mostly for async test you can see examples of that on the quickstart folder)
  • make sure the new test files are effectively tested modifying the tests folders pytest should look at

example of suck a change is available in #167

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions