Skip to content

Module code is executed twice when collecting doctests #11306

Closed
@flying-sheep

Description

@flying-sheep
  • a detailed description of the bug or problem you are having
  • output of pip list from the virtual environment you are using
  • pytest and operating system versions
  • minimal example if possible

Bug description and minimal example

https://github.com/flying-sheep/pytest-doctest-import-twice

Versions

OS: Arch Linux

pip list --format=json --exclude-editable | from json | to md --pretty
name version
iniconfig 2.0.0
packaging 23.1
pip 23.2.1
pluggy 1.2.0
pytest 7.4.0
setuptools 68.0.0
wheel 0.41.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: doctestsrelated to the doctests builtin plugintopic: collectionrelated to the collection phase

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions