lettuce icon indicating copy to clipboard operation
lettuce copied to clipboard

behave_as not reporting undefined steps

Open daemianmack opened this issue 13 years ago • 1 comments

Just ran into an issue where a behave_as was failing and it took me a bit to notice I had defined a step "log in as" but I had referenced it as "login as". I didn't notice it right away because the 'undefined' step wasn't reported as such.

Looking in core.py, this seems like a stab at the right sort of idea...

358 (_, _, steps_failed, steps_undefined, _) = self.run_all(steps)                                                                                                                                                               
359 if not steps_undefined and not steps_failed:

though that's based on a very naive read of the code and it's clearly missing some more logic, as it produces

AttributeError: 'NoneType' object has no attribute 'traceback'

I'd be happy to write a patch if you can point me in the right direction.

daemianmack avatar May 12 '11 23:05 daemianmack

Should be resolved in #429 -- although I've been wondering whether behave_as should increment the step counts... or emit hooks to output lines.

danni avatar Feb 12 '14 13:02 danni