Skip to content

Support doctest_global_setup #23

@twmr

Description

@twmr

The doctest plugin in sphinx support specifying a code block in conf.py that is called at setup time

doctest_global_setup = '''
try:
    import pandas as pd
except ImportError:
    pd = None
'''

Support for specifying this code block somewhere should be added.

It can't be added to pytest.ini, because AFAIK it (or ini files in general) doesn't have support for multiline values. So probably it needs to be set in conftest.py. If anyone know how this can be done - please comment.

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