Skip to content

Fix crash in runtest teardown hook #207

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

Merged
merged 6 commits into from
Feb 17, 2023

Conversation

lukasNebr
Copy link
Contributor

This PR refers to issue #206

I improved the implementation of the pytest runtest hook. Now the hook is compatible with test cases that use the TestCase class as base class. This fixes this error.

In addition I added a check to avoid this attribute error. It is clear that this does not fix the general problem with hooks beeing overwritten by other plugins.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Update from base
@lukasNebr lukasNebr marked this pull request as ready for review February 16, 2023 22:13
Copy link
Contributor

@icemac icemac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just some little changes.

Thank you for this PR.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@icemac icemac merged commit cb1234d into pytest-dev:master Feb 17, 2023
@icemac
Copy link
Contributor

icemac commented Feb 17, 2023

@lukasNebr lukasNebr deleted the fix_crash_runtest_teardown branch February 17, 2023 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AttributeError: 'TestCaseFunction' object has no attribute 'execution_count'
2 participants