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
[Doc] parametrize_with_cases
takes list of such elements
#257
Comments
Good catch. Maybe CaseType = Union[Callable, Type, ModuleRef]
def parametrize_with_cases(...
cases=AUTO, # type: Union[CaseType, Iterable[CaseType]] ? (plus the API reference documentation pages you mention, as they are not auto-generated :( ) Note that it should also change in If you feel like proposing a PR I would happily review it ;) Note that we don't have typing tests in the test suite, so please check the mod with your favorite tool just to be sure thanks in advance ! |
I can look into this later this week, I assume some tests to actually verify that this behaviour is correct might be required i.e. That a I havn't looked through the tests of |
Yes the tests already support it since the corresponding code is covered https://smarie.github.io/python-pytest-cases/reports/coverage/d_e0f0fa8c1f5d62a2_case_parametrizer_new_py.html#t240 (line 245) This is really just type hints, sorry for this :'( |
Cool, thanks for pointing me to it, it should be a quick doc update then :) I'll have a look later today so! |
Closed by #259 |
Ello,
While the documentation, the type signature for
cases
doesn't seem to indicate it takes listsof such items
Callable
,Type
andModuleRef
while the description below says it does.typo in "suported" that can be fixed :)
I understand this would complicate the type signature but I was hoping to distuinguish between the two cases. The code seems to indicate the second option here.
In any case, do you think it makes sense to make this more explicit? I imagine making the type signature more explicit in the docs is much too long but at least in the documentation to clarify it?
The text was updated successfully, but these errors were encountered: