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

Fix crash in runtest teardown hook #207

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.

@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.

CHANGES.rst Outdated Show resolved Hide resolved
CHANGES.rst Outdated Show resolved Hide resolved
pytest_rerunfailures.py Outdated Show resolved Hide resolved
@icemac icemac merged commit cb1234d into pytest-dev:master Feb 17, 2023
@icemac
Copy link
Contributor

icemac commented Feb 17, 2023

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