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

[BUG] pytest plugin broken and triggering warnings/missreported errors on modern pluggy #2181

Closed
3 tasks done
RonnyPfannschmidt opened this issue May 13, 2024 · 1 comment · Fixed by #2242
Closed
3 tasks done
Assignees
Labels
Priority: High Important but not urgent Python: Pytest Pytest integration Type: Bug Errors or unexpected behavior

Comments

@RonnyPfannschmidt
Copy link
Contributor

Checklist

  • I checked the FAQ section of the documentation
  • I looked for similar issues in the issue tracker
  • I am using the latest version of Schemathesis

Describe the bug

schemathesis uses the now legacy mechanism for hook-wrappers, in which raising exceptions from the hook is actually incorrect (it should be set on the outcome object)
recent versions of pluggy trigger a warning on those exceptions

the pytest_pyfunc_call hook should either switch to modern pluggy/pytest and use (wrapper=True) instead of (hookwrapper=True) (the implementation of the hook as is , seems to be correct for modern wrappers)
or it needs to use the outcome object api to transfer the exception

@RonnyPfannschmidt RonnyPfannschmidt added Status: Needs Triage Requires initial assessment to categorize and prioritize Type: Bug Errors or unexpected behavior labels May 13, 2024
@Stranger6667
Copy link
Member

@RonnyPfannschmidt

Thank you so much for opening this! I am going to work on this this week

@Stranger6667 Stranger6667 added Priority: High Important but not urgent Python: Pytest Pytest integration and removed Status: Needs Triage Requires initial assessment to categorize and prioritize labels May 13, 2024
Stranger6667 added a commit that referenced this issue Jun 4, 2024
Ref: #2181

Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
Stranger6667 added a commit that referenced this issue Jun 4, 2024
Ref: #2181

Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
Stranger6667 added a commit that referenced this issue Jun 4, 2024
Ref: #2181

Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
Stranger6667 added a commit that referenced this issue Jun 4, 2024
Ref: #2181

Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
Stranger6667 added a commit that referenced this issue Jun 4, 2024
Ref: #2181

Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
Stranger6667 added a commit that referenced this issue Jun 4, 2024
Ref: #2181

Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
Stranger6667 added a commit that referenced this issue Jun 4, 2024
Ref: #2181

Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High Important but not urgent Python: Pytest Pytest integration Type: Bug Errors or unexpected behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants