Now I succeed in reproducing the issue.

Taking the example of Jacques-Etienne:
 - Feature has tag @init
 - Scenario has tag @modules

 $ behave --tags @modules --stop 
   --> it's all right, the ctx.data exists

 $ behave --tags @init --tags @modules --stop
  --> it's broken, the ctx.data does not exist

It is a bug in Behave: the "before_feature" should be executed in any case 
where a Scenario is executed.
I will report it upstream, and we could provide a workaround in the meantime.

** Changed in: oerpscenario
       Status: Invalid => New

** Changed in: oerpscenario
     Assignee: Nicolas Bessi - Camptocamp (nbessi-c2c) => Florent (florent.x)

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OERPScenario.
https://bugs.launchpad.net/bugs/1154208

Title:
  ctx.data not initialized when executing a step

Status in OpenERP Scenario : Functional tests by Camptocamp:
  New

Bug description:
  Hi,

  ctx.data is initialized inside before_feature (environment.py). However, the 
before_feature method is only called when running a feature, it's not called 
when executing only one step.
  Can you please ensure ctx.data is initialized in before_step, e.g.
  |      if not hasattr(ctx,'data'):
  |          ctx.data = {}

  By the way, what's the purpose of that data dict?

  kr,
  J-E

To manage notifications about this bug go to:
https://bugs.launchpad.net/oerpscenario/+bug/1154208/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~c2c-oerpscenario
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~c2c-oerpscenario
More help   : https://help.launchpad.net/ListHelp

Reply via email to