Replies: 4 comments 6 replies
-
|
@elchupanebrej I was inspired to have this change after reading your comment |
Beta Was this translation helpful? Give feedback.
-
|
@youtux is this still something that you think would be helpful to revisit? |
Beta Was this translation helpful? Give feedback.
-
|
+1 on revisiting this, with a concrete reason. The thing that bites us with The override case comes up for us too. When we need to xfail a single scenario or give it a different fixture, today that means dropping Happy to try the class-return approach against our suite and report back what breaks. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks, that works for me. I'll take a run at it and keep you posted. Before I write much code, one design fork I'd like your steer on: backward compatibility. Today
I lean towards 1 for a first pass (additive, no break), with 2 as a follow-up if you want to retire injection later. Does that match how you'd want it to land? Smaller things I'll pin down as I go: how method names are derived from scenario names (snake_case, duplicate or colliding names), and how this plays with scenario outlines and parametrized examples. I'll start from your stub and open a draft PR early so you can redirect before I go too far. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Reading the comment at #310 (comment) (and relative implementation), I figured out that we could make the
scenarios(...)function much neater if we made it return a class instead of injecting into the module locals.For example, given the following feature file:
and the following file:
and it would be syntactic sugar for the following:
This way, if a user needs to override a specific scenario for whatever reason, that could be done easily like this:
I can imagine an stub implementation of
scenarios(...)to be something like this:Beta Was this translation helpful? Give feedback.
All reactions