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

Refactor pytest plugin to not monkey patch call_runtest_hook. #157

Merged
merged 3 commits into from
Aug 6, 2019

Conversation

Jeff-Meadows
Copy link
Contributor

A previous refactor (#74) enabled this, but I didn't notice.
Previously, flaky stored information about test reruns inside a
CallInfo subclass. call_runtest_hook was monkey patched so that
flaky could ensure that subclass was created. #74 moved that info
into the plugin, so the monkey patch was no longer doing anything
special.

However, over time, flaky's implementation diverged from pytest's.
This caused #139 and #156.

This commit removes the monkey patch, and flaky now uses pytest's
implementation, which fixes those issues and is more future proof.

A previous refactor (#74) enabled this, but I didn't notice.
Previously, flaky stored information about test reruns inside a
CallInfo subclass. call_runtest_hook was monkey patched so that
flaky could ensure that subclass was created. #74 moved that info
into the plugin, so the monkey patch was no longer doing anything
special.

However, over time, flaky's implementation diverged from pytest's.
This caused #139 and #156.

This commit removes the monkey patch, and flaky now uses pytest's
implementation, which fixes those issues and is more future proof.
@boxcla
Copy link

boxcla commented Aug 6, 2019

Verified that @Jeff-Meadows has signed the CLA. Thanks for the pull request!

@Jeff-Meadows Jeff-Meadows merged commit 1613953 into master Aug 6, 2019
@Jeff-Meadows Jeff-Meadows deleted the fix_ctrl_c branch August 6, 2019 18:22
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.

None yet

2 participants