Developing behave steps with PyDev
Question: [Behave](http://pythonhosted.org/behave/) is a great tool for behavior driven
development in Python. However, in combination with PyDev I've got two
Problems:

  1. PyDev can't resolve behave's `@given`, `@when` and `@then` annotations. This probably happens because behave does some name magic the `behave` package. 
  2. behave suggests to name all methods `step` as every method has an annotation which defines the "real" name. PyDev complains about these "duplicate" methods.

Example:

    
        from behave import given, when, then
    
    @given('I navigate to Google')
    def step(context):
        # ...
    
    @when('I enter coffee into the search field')
    def step(context):
        # ...
    

By now, I work around both Problems by including `#@PydevCodeAnalysisIgnore`,
which turns off any PyDev analysis. I'd like to keep PyDev analysis for all
other parts of the code.

Any suggestions how to solve this?


Answer:   1. Just a guess. Have You tried with import redefinitions? 
    
        from behave import given as given_behaviour, when as when_behaviour, then as then_behaviour
    @given_behaviour('I navigate to Google')
    

You can also check the eclipse settings: menu Window -> Preferences -> PyDev
-> Interpreters -> Python Interpreters. Sometimes it might help to remove and
re-add the python interpreter if new libraries has been added after that the
interpreter was configured in order to include those in the System
`PYTHONPATH` in eclipse.

  2. Try adding `#@` followed by the message in camel case to the end of the method name to turn off the warning message in PyDev. Something like:
    
        def step(context): #@DuplicatedSignature
    

