Behave/Gherkin "And" steps not recognized?

I'm using PyCharm 4.0.4 professional with Behave 1.2.4 and I'm seeing that while steps preceded with When and Then are recognized correctly, the same steps preceded by And or But will fail to be recognized, although they will run. I have my preferred BDD environment set to "Behave", default folders are correct in the Behave Run/Debug configuration dialog. Is there some configuration step I've missed?

Thanks,

Perry
3 comments
Comment actions Permalink
Bump....any kind souls?
0
Comment actions Permalink
Hi.
Could you please give us example of step that does not work?

But and And are supported. Keywords should be capitalized in Gherkin file. In python file, you should use "@step" decorator.

Look:

Scenario: Enter scenario name here
    Given I am superman
    And I am cool
    But I am also smart

And here are definitions:



@step("I am cool")
def step_impl(context):
    """
    :type context behave.runner.Context
    """
    pass


@given("I am superman")
def step_impl(context):
    """
    :type context behave.runner.Context
    """
    pass


@step("I am also smart")
def step_impl(context):
    """
    :type context behave.runner.Context
    """
    pass
0
Comment actions Permalink
That was it...the @step decorator wasn't being used. Thanks so much!

Perry
0

Please sign in to leave a comment.