Closed chrisjarman closed 7 months ago
@chrisjarman really thank you ! 🍾 I will merge it, I'm working to approve my unit tests about ti.
I reproduced bug, I merge your PR and add unit test for it. Really thank you @chrisjarman .
@amiceli You're very welcome! Thank you for writing this library - I'm finding it really useful. Glad to be able to contribute in some small way.
BTW, thank you for digging in and reproducing this; I'm painfully aware I didn't add any reproduction steps or test cases around this. It was a Friday afternoon; I needed to make my scenarios work for a demo video, and after successfully patching my local install of your package I thought I'd better share it!
The "multiple examples" aspect of the scenario outline feature is broken. The synchronous loop over each of the examples causes the test runner to execute the test suite N times, but it does so on each iteration with the last item of example data, rather than the _i_th item.
This change simply creates a closure around the current iteration's step functions, so that they aren't clobbered on the next go-around of the loop.