Skip to content

When and how often is conftest.py loaded? #11312

Discussion options

You must be logged in to vote

first, a conftest should never throw in mocks at import time, it completely breaks details even if it looks like its working

second - conftests are either loaded at pytest startup (early conftests) or at collection time (the rest of them)

all conftests are supposed to be imported once

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by andrii-korotkov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants