Skip to content

Make parameterized.expand play nice with underlying mock patches#129

Merged
wolever merged 5 commits intowolever:masterfrom
alexpizarroj:fix-issue-66
Mar 2, 2023
Merged

Make parameterized.expand play nice with underlying mock patches#129
wolever merged 5 commits intowolever:masterfrom
alexpizarroj:fix-issue-66

Conversation

@alexpizarroj
Copy link
Contributor

Fixes issue #66.

This is a workaround for https://bugs.python.org/issue40126 when using parameterized.expand along old mock versions.

Avoid fully stripping out patches from source methods and replace them with a "dummy" no-op patch instead.

@alexpizarroj
Copy link
Contributor Author

alexpizarroj commented Aug 22, 2021

Greetings, @wolever

I've put together a PR that fixes the long-standing issue #66. I'd love to get some feedback on it / hear your thoughts. 😃

Also, is there a way for me to trigger CI tests for my PR? Nevermind, just managed to run them and they all passed 🎆 : https://app.circleci.com/pipelines/github/alexpizarroj/parameterized/2/workflows/eb15ed9c-5118-443e-a33d-ad70414aa6d9

Thanks in advance.

@alexpizarroj
Copy link
Contributor Author

Just realized that you may have already implemented something very similar to this workaround, @wolever . I'm talking about 737c1e8. The "hack" in the commit is very similar to mine, though you also introduced changes to the reapplication of patches. Was there any reason to not pursue this further?

@wandering-tales
Copy link

👍

@alexpizarroj
Copy link
Contributor Author

@wolever Please take a look when you can, or perhaps point me to someone else maintaining this project who can help push this forward... It's been a couple of months since I posted and I'd hate for this to get stale again 🙏🏻

@apizarro-paypal
Copy link

@wolever Would appreciate some eyes on this, please. It's already been several months 🙏🏻

@abacigalup-eb
Copy link

bump, +1

@wolever wolever merged commit e8c47b2 into wolever:master Mar 2, 2023
@wolever
Copy link
Owner

wolever commented Mar 2, 2023

Ah! Thank you very much for the time you've put into this, and I'm extremely sorry it took so long to get merged.

It's in there now, and will be released as part of 0.9.0.

Thank you again!

@alexpizarroj alexpizarroj deleted the fix-issue-66 branch March 2, 2023 12:16
@wolever
Copy link
Owner

wolever commented Mar 27, 2023

Hey folks! Just a heads up: 0.9.0 is out: https://pypi.org/project/parameterized/0.9.0/

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.

5 participants