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.
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 append( '/home/ jeroen/ workspace/ openerp7/ server' )
sys.path.
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:
" oerp_addons/ product/ product_ sample. feature: 13
@product @product_sample
Feature: Create the needed product # features/
Scenario: Test product categories # features/ oerp_addons/ product/ product_ sample. feature: 14 jeroen/ workspace/ oerpscenario/ bin/behave" , line 42, in <module> exit(behave. __main_ _.main( )) jeroen/ workspace/ oerpscenario/ eggs/behave- 1.2.3-py2. 7.egg/behave/ __main_ _.py", line 111, in main jeroen/ workspace/ oerpscenario/ eggs/behave- 1.2.3-py2. 7.egg/behave/ runner. py", line 474, in run with_paths( ) jeroen/ workspace/ oerpscenario/ eggs/behave- 1.2.3-py2. 7.egg/behave/ runner. py", line 504, in run_with_paths jeroen/ workspace/ oerpscenario/ eggs/behave- 1.2.3-py2. 7.egg/behave/ model.py" , line 410, in run run(runner) jeroen/ workspace/ oerpscenario/ eggs/behave- 1.2.3-py2. 7.egg/behave/ model.py" , line 687, in run jeroen/ workspace/ oerpscenario/ eggs/behave- 1.2.3-py2. 7.egg/behave/ model.py" , line 1012, in run match(NoMatch( )) jeroen/ workspace/ oerpscenario/ eggs/behave- 1.2.3-py2. 7.egg/behave/ formatter/ pretty. py", line 149, in match _match. location, self.monochrome) jeroen/ workspace/ oerpscenario/ features/ support/ behave_ better. py", line 115, in print_step location( location, proceed)
Given there is a product category named "Devices"Traceback (most recent call last):
File "/home/
sys.
File "/home/
failed = runner.run()
File "/home/
return self.run_
File "/home/
failed = feature.run(self)
File "/home/
failed = scenario.
File "/home/
if not step.run(runner):
File "/home/
formatter.
File "/home/
self.
File "/home/
location = self.indented_
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