-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
testscenarios support #263
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
Related to #916? |
perhaps in a different way tho, testscenarios is a unittest extension |
Reference: testscenarios |
Closing as wish list item that got lost, implemented as a PR it would still be welcome |
How about adding the scenarios implementation (from the docs) to the py.test code base, so it could simply be imported? And rewrite the docs appropriately? |
IMHO that would be perfect for an external plugin. A quick search found pytest-scenario, which might be useful already. 😁 |
pytest-scenario is rather complex to use. IIUC, it requires an external JSON file. Which reminds me of:
Or maybe I'm just not smart enough (anyway, the plugin is young). I'd rather prefer to include the scenarios with the test code, just like the example in the docs show. Ideally, I'd like to have a decorator on top of a @pytest.parametrize(scenarios=[
('scenario-1', {'arg1_name': 'arg1-value', ...}),
...
])
class TestFooBar(object):
... Even better, if we could put |
@bittner at first glance, this looks exactly like parametrize just spelled in a different way |
@bittner perhaps you can discuss this with the pytest-scenario author? cc @OriMenashe |
@RonnyPfannschmidt Okay, I see. Thanks for the hint. @nicoddemus I have tried to get in touch with the plugin author before via OriMenashe/pytest-scenario#2. Let's see how this develops. |
Originally reported by: Ronny Pfannschmidt (BitBucket: RonnyPfannschmidt, GitHub: RonnyPfannschmidt)
testscenarios needs some special handling of the collection,
since its allowed to run multiple tests per TestCase.run unless one generates the scenarios
The text was updated successfully, but these errors were encountered: