8000 Public API for `DoctestItem` · Issue #10312 · pytest-dev/pytest · GitHub
[go: up one dir, main page]

Skip to content
Public API for DoctestItem #10312
@tony

Description

@tony

I assume by DoctestItem only being available from _pytest.doctest.DoctestItem, it's an internal / unstable API.

If I'm completely mistaken in that assumption please let me know

What's the problem this feature will solve?

Stable import for:

  • isinstance checking inside of autorun setup fixtures w/ doctest_namespace (see my libtmux, libvcs examples, as well and cs.github.com search query)
  • other plugins re-using DoctestItem, e.g. my docutils plugin

Describe the solution you'd like

Perhaps pytest.DoctestItem or something of the sort

Alternative Solutions

Further battle-testing of pytest's doctest plugin to stabilize the API, then exporting it

Additional context

I am using DoctestItem on 3+ open source projects and need a stable place to import the type from

  1. libtmux/conftest.py
  2. libvcs/src/libvcs/conftest.py
  3. pytest-doctest-docutils (overrides pytest's doctest plugin)
  4. See search for /from.*DoctestItem/ language:Python on cs.github.com

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

      0