Skip to content

Small regression in 0.4.1: print(__doc__) creates empty output block  #528

@lesteve

Description

@lesteve

Seen in scikit-learn/scikit-learn#14507 (comment), print(__doc__) creates empty output box (yellowish box in the output below).

image

This was introduced by #475. A simple fix would be to not have an output box if my_stdout.isspace() and add a test similar to the one introduced in #475 to check that print(__doc__) does not create an output box.

Small reminder: many scikit-learn examples have print(__doc__) at the beginning, so inside sphinx-gallery we set __doc__ = '' (__doc__ is already rendered at the top of the example HTML so you don't want it captured in stdout as well).

ping @lucyleeow who is interested to work on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions