Comment 8 for bug 1200155

Revision history for this message
ONESTEiN (info-lq) wrote :

I managed to solve the bug by adding
  import pretty
in the __init__.py file in the formatter directory:

./eggs/behave-1.2.3-py2.7.egg/behave/formatter/__init__.py:1:import pretty

Unfortunately, new errors occured.

 File "/home/jeroen/workspace/oerpscenario/features/steps/tools.py", line 5, in <module>
    import openerp
ImportError: No module named openerp

which I fixed by adding:

import sys
sys.path.append('/home/jeroen/workspace/openerp7/server')

In the ./features/steps/tools.py file.

Now, after running:

/home/jeroen/workspace/oerpscenario/bin/behave -k /home/jeroen/workspace/oerpscenario/features/oerp_addons/product/product_sample.feature

The programm seems to work, but soon after it stops, due to a missing function:

"
@product @product_sample
Feature: Create the needed product # features/oerp_addons/product/product_sample.feature:13

  Scenario: Test product categories # features/oerp_addons/product/product_sample.feature:14
    Given there is a product category named "Devices"Traceback (most recent call last):
  File "/home/jeroen/workspace/oerpscenario/bin/behave", line 42, in <module>
    sys.exit(behave.__main__.main())
  File "/home/jeroen/workspace/oerpscenario/eggs/behave-1.2.3-py2.7.egg/behave/__main__.py", line 111, in main
    failed = runner.run()
  File "/home/jeroen/workspace/oerpscenario/eggs/behave-1.2.3-py2.7.egg/behave/runner.py", line 474, in run
    return self.run_with_paths()
  File "/home/jeroen/workspace/oerpscenario/eggs/behave-1.2.3-py2.7.egg/behave/runner.py", line 504, in run_with_paths
    failed = feature.run(self)
  File "/home/jeroen/workspace/oerpscenario/eggs/behave-1.2.3-py2.7.egg/behave/model.py", line 410, in run
    failed = scenario.run(runner)
  File "/home/jeroen/workspace/oerpscenario/eggs/behave-1.2.3-py2.7.egg/behave/model.py", line 687, in run
    if not step.run(runner):
  File "/home/jeroen/workspace/oerpscenario/eggs/behave-1.2.3-py2.7.egg/behave/model.py", line 1012, in run
    formatter.match(NoMatch())
  File "/home/jeroen/workspace/oerpscenario/eggs/behave-1.2.3-py2.7.egg/behave/formatter/pretty.py", line 149, in match
    self._match.location, self.monochrome)
  File "/home/jeroen/workspace/oerpscenario/features/support/behave_better.py", line 115, in print_step
    location = self.indented_location(location, proceed)
AttributeError: 'PrettyFormatter' object has no attribute 'indented_location'
"

I am stuck now, I have tried some things, for example adding an indented_location function (which does not do so much),
but this gives new problems.

Does any has an idea what is going on here?

regards,
Jeroen