Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address internal pytest error during collection of doctests #685

Merged
merged 1 commit into from
Nov 26, 2023

Commits on Nov 22, 2023

  1. [fix] Fixes a bug that caused internal pytest errors during test coll…

    …ection with doctests.
    
    Pytest-asyncio attaches an event loop of a particular scope to each collector during pytest_collectstart. The implementation did not account for the fact that collectors may have specialized subclasses, such as DoctestModule. This caused a KeyError during a dictionary access, leading to an internal pytest error in the collection phase.
    
    This patch changes the implementation of pytest_collectstart to account for subclasses of collectors.
    
    Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
    seifertm committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    61c986b View commit details
    Browse the repository at this point in the history