Skip to content

__doctest_requires__ does not work with pytest-xdist? #109

@pllim

Description

@pllim

There is a module like this:

"""I am a module.

Examples
--------
>>> import yaml  # optional dependency
>>> do_stuff
"""

__doctest_requires__ = {'*': ['yaml']}

# Real code to follow

In a CircleCI job with pytest-xdist installed and parallel run is enabled, the doctest fails with ImportError: import yaml failed but the other jobs passed.

xref astropy/astropy#10257

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions