Skip to content

Why do I get this error depending on the function name? #9035

Answered by Zac-HD
sanghyuckNa asked this question in Q&A
Discussion options

You must be logged in to vote

In your first example, pytest collects the function named test as a test function and then errors because it has an argument named x but there is no corresponding fixture. In the second example, func is not collected as a test.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Zac-HD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
type: question general question, might be closed after 2 weeks of inactivity topic: collection related to the collection phase topic: fixtures anything involving fixtures directly or indirectly
2 participants
Converted from issue

This discussion was converted from issue #9032 on August 25, 2021 01:16.