-
Notifications
You must be signed in to change notification settings - Fork 195
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
Show how @parameterized could replace @data_provider #558
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## main #558 +/- ##
=======================================
Coverage 94.77% 94.77%
=======================================
Files 235 235
Lines 23274 23274
=======================================
Hits 22058 22058
Misses 1216 1216
Continue to review full report at Codecov.
|
Do failures look decent? I'm mainly looking for if a failure message includes the inputs or at least some label. |
Error w/ libcst.testing.utils.data_provider
Errors with equivalent parameterized.expand:
|
It doesn't. The arguments to the decorator aren't typechecked against the arguments of the test method. I would argue that migrating to parameterized is better than the broken attempt at typing in data_provider. It doesn't feel like a feature that will be supported any time soon by pyre or mypy. Generally I question the value of implementing a parameterized testing in libcst (vs a standalone lib) |
Fully agree. Alright, I'm on board :) |
Hi @lpetre! Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours needs attention. You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Summary
@data_provider seems unnecessary to include in libcst. Why not use a pypi equivalent. Here is an example using parameterized
Let me know what you think and I'll convert the rest of the tests
Test Plan