title: Behave / python3: Test undefined even if the step function is present
body: <p>I have started using behave to define behaviour-driven tests on Python3.
  The first tests went fine, but now I am incurring in a most puzzling error.</p>
  
  <p>I have define this Gherkin file <code>sra-to-isatab-batch-conversion.feature</code>:</p>
  
  <pre><code>Feature: SRA to ISA-tab Batch conversion
  # perform a batch conversion of a set of SRA datasets, retrieved from the European Nucleotide Archive
  # to ISA-tab
  
  Scenario: Batch conversion form a list of SRA accession numbers
   Given An access number "ERA000084"
   And nothing else
   When the SRA to ISA tab conversion is invoked
   Then it should return a ZIP file object
   And the ZIP file should contain as many directories as the element in the list
  </code></pre>
  
  <p>Then I define the following step methods in a file <code>steps/sra-to-isatab-batch-conversion.py</code></p>
  
  <pre><code>from behave import *
  
  use_step_matcher("parse")
  
  
  @given('An access number "{access_number}"')
  def step_impl(context, access_number):
      context.access_number = access_number
      print(context.access_number)
  
  @step("nothing else")
  def step_impl(context):
      print("Nothing else") 
  
  
  @when("the SRA to ISA tab conversion is invoked")
  def step_impl(context):
   pass
  
  
  @then("it should return a ZIP file object")
  def step_impl(context):
      pass
  
  
  @step("the ZIP file should contain as many directories as the element in the list")
  def step_impl(context):
      pass
  </code></pre>
  
  <p>If I then run <code>behave sra-to-isatab-conversion.feature</code> the step function related to the <code>when</code> step appears to be missing:</p>
  
  <pre><code>Feature: SRA to ISA-tab Batch conversion # sra-to-isatab-batch-conversion.feature:2
  
  Scenario: Batch conversion form a list of SRA accession numbers                  # sra-to-isatab-batch-conversion.feature:6
  Given An access number "ERA000084"                                             # steps/sra-to-isatab-batch-conversion.py:6 0.000s
  And nothing else                                                               # steps/sra-to-isatab-batch-conversion.py:40 0.000s
  When the SRA to ISA tab conversion is invoked                                  # None
  Then it should return a ZIP file object                                        # None
  And the ZIP file should contain as many directories as the element in the list # None
  
  /Users/massi/Projects/oerc/isa-api/features/test_outputs
  
  Failing scenarios:
    sra-to-isatab-batch-conversion.feature:6  Batch conversion form a list of SRA accession numbers
  
  0 features passed, 1 failed, 0 skipped
  0 scenarios passed, 1 failed, 0 skipped
  2 steps passed, 0 failed, 2 skipped, 1 undefined
  Took 0m0.001s
  
  You can implement step definitions for undefined steps with these snippets:
  
  @when(u'the SRA to ISA tab conversion is invoked')
  def step_impl(context):
      raise NotImplementedError(u'STEP: When the SRA to ISA tab conversion is invoked')`
  </code></pre>
  
  <p>I have tried to redefine the step description change the number of given statements,I have even rewritten the files, but I always get this same errors. Even if I copy the statement suggested in the error message I still get the very same error.</p>
  
  <p>Can anyone explain me what I am doing wrong?
  I am using
  Python 3.4
  Behave 1.2.5
  PyCharm 5.0.4 (notice that PyCharm BDD tools recognise the matching between statements in the Gherkin file and the step functions)</p>