Skip to content

Suport for interactive Python shell code? #77

@liqimai

Description

@liqimai

It is quite often markdown contains interactive Python shell code like:

>>> print("Hello World!")
Hello World!
>>> def add(a, b):
...     return a + b
...
>>> add(2,3)
5

Currently, I got following exception for these blocks in my README.md.

invalid syntax (<string>, line 1)

Can you add support to test it? I expect the behaviour to be same as pytest --doctest-modules, as if the code block is a function's doc-string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions