-
Notifications
You must be signed in to change notification settings - Fork 90
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
test cli for pydantic gen and add deprecated support for --pydantic_v… #1781
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1781 +/- ##
=======================================
Coverage 79.84% 79.84%
=======================================
Files 98 98
Lines 11280 11281 +1
Branches 2905 2905
=======================================
+ Hits 9006 9007 +1
+ Misses 1728 1727 -1
- Partials 546 547 +1 ☔ View full report in Codecov by Sentry. |
def test_metamodel_valid_cli_arguments(arguments, kitchen_sink_path): | ||
runner = CliRunner() | ||
arguments_str = " ".join(arguments) | ||
result = runner.invoke(pydanticgen.cli, f"{arguments_str} {kitchen_sink_path}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately I've learned that passing a string as the second argument to runner.invoke
doesn't work on Windows (because that signature relies on the shlex
module under the hood). Gotta use a list of strings instead.
oh sry wish i woulda seen this - i did this in #1927 edit: oh wait nevermind! i thought this was for just the parameter, which also wasn't working in general (it would just take the version of pydantic in the environment regardless of what was passed). didn't see it was was for supporting the underscore version. +1 to the reasons to have a good deprecations module #1957 |
…ersion
fixes #1780