[+] I have searched the existing issues and I'm convinced that mine is new.
Ask your Question
So, I'm trying to reuse another step that reads return codes, and inside the step that reads return codes, it uses step.embed. I noticed that when I call the step like this:
step.behave_like("A return code of 0 is received")
It just leaves a blank space in the report. But when I call the step as a function (I am using a classes to implement my steps) and pass step as a parameter, then the embedding in the report actually works:
self.read_return_code(step, 0)
I peeked into the code of behave_like and saw that a new Step instance is actually created:
Although I see that self.parent was passed in the constructor, which should take care of passing the context, it still behaves differently.
Are you able to clarify this? I have grouped my steps into classes based on the feature we are testing, so calling step.behave_like helps reuse steps without needing to instantiate the actual class.
Important notices Before you add a new report, we ask you kindly to acknowledge the following:
[+] I have read the contributing guide lines at https://github.com/radish-bdd/radish/blob/master/.github/CONTRIBUTING.md
[+] I have read and respect the code of conduct at https://github.com/radish-bdd/radish/blob/master/.github/CODE_OF_CONDUCT.md
[+] I have searched the existing issues and I'm convinced that mine is new.
Ask your Question So, I'm trying to reuse another step that reads return codes, and inside the step that reads return codes, it uses step.embed. I noticed that when I call the step like this:
It just leaves a blank space in the report. But when I call the step as a function (I am using a classes to implement my steps) and pass step as a parameter, then the embedding in the report actually works:
I peeked into the code of behave_like and saw that a new Step instance is actually created:
Although I see that self.parent was passed in the constructor, which should take care of passing the context, it still behaves differently.
Are you able to clarify this? I have grouped my steps into classes based on the feature we are testing, so calling step.behave_like helps reuse steps without needing to instantiate the actual class.