-
Notifications
You must be signed in to change notification settings - Fork 39
question: skipping cases? #173
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
Comments
Oops -- found the doc that answers my question! |
Perfect ! Thanks for the feedback @shaunc |
Already partially working! Great package; thanks @smarie! Only thing that tripped me up in the beginning: I was creating my fixtures in modules of a package, whose "init" was importing them. Then when I used fixtures, which depended on other fixtures which were annotated with @parametrize_by_cases, I would get weird "not found" errors -- I thought that chaining case-annotated fixtures wasn't working perhaps. Of course, the problem turned out to be that new names are generated in module scope, and I needed to import these into the package init. It would be nice to have that in the docs somewhere (in a "warning box" perhaps :)) -- I understand that pytest is magical and pytest_cases doubles down, but putting things at module scope should still be documented.... they could run into other symbols, for instance, and the user wouldn't know what was happening.... |
Actually I have put some safeguards here to generate unique names. But you're right, your point is the same as the one we discussed in #158. @plammens opened #174 for it. More generally the new engine #170 should remove all hidden fixture creation, as it was a good way to get me started but has a lot of side effects. Thanks for the feedback ! |
Is there a good workaround for typing these hidden fixtures, btw?
[and a bunch more such errors from mypy...] I presume that if I just add them to the module, their names will change. Can I mark them as "to be overridden", somehow? |
I'm afraid not :( in general I would not recommend using typing/mypy on the test folder, but of course this is a personal decision. If you wish you can open a dedicated issue on this topic (in that case please try to provide a minimal reproducible example) so that users can try to help/have a look |
ok ... well for the moment doing |
ok, thanks! |
Thank you for your library! I am interested in using it to organize the tests for my machine learning library. (I am now using ad-hoc methods to combine fixtures with parametrize.)
Running on some cases, however, is very slow; I don't want to always have to run these cases.
For my tests themselves, I have defined the following decorator:
Can I use this or something similar with test cases, to optionally skip them?
The text was updated successfully, but these errors were encountered: