You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a workaround, changing the name of the method receiver parameter from self to something else solves the problem, e.g. the following behaves correctly:
fromhypothesisimportstrategiesasst, givenimportpytestclassTestSomething:
@given(x=st.just(1))@pytest.mark.anyioasyncdeftest_foo(_, x): # self is now _assertx==1
Things to check first
I have searched the existing issues and didn't find my bug already reported there
I have checked that my bug is still present in the latest release
AnyIO version
4.3.0
Python version
3.12.2
What happened?
When running a hypothesis test that is a class member, the test runner fails with a TypeError, citing multiple values for
self
being passed.How can we reproduce the bug?
The following script reproduces the issue, using pytest 8.1.1 and hypothesis 6.99.5:
The following output is produced under pytest:
The text was updated successfully, but these errors were encountered: