Skip to content

Make it possible to show testsetup blocks #3247

@tsznuk

Description

@tsznuk

Testsetup blocks are hidden by default. In some cases (e.g. when defining functions that should be available in all doctest groups) it would be convenient to be able to make the code visible.

Adding a show option to the testsetup directive would be one way of achieving this.

Example:

.. testsetup:: *
   :show:

   def connect():
      ...
      
 .. testcode:: group1

    conn = connect()     

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions