better behave not compatible with version 1.2.3

Bug #1200155 reported by Nicolas Bessi - Camptocamp
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OERPScenario
Fix Committed
Critical
Alexandre Fayolle - camptocamp

Bug Description

Hello,

behave_better is not compatible with version 1.2.3 of behave.

Regards

Nicolas

_test_xxxxxx/parts/account-financial-tools/account_credit_control/scenarios/
Traceback (most recent call last):
  File "./bin/behave", line 47, in <module>
    behave.__main__.main()
  File "/srv/openerp/.buildout/eggs/behave-1.2.3-py2.6.egg/behave/__main__.py", line 111, in main
    failed = runner.run()
  File "/srv/openerp/.buildout/eggs/behave-1.2.3-py2.6.egg/behave/runner.py", line 474, in run
    return self.run_with_paths()
  File "/srv/openerp/.buildout/eggs/behave-1.2.3-py2.6.egg/behave/runner.py", line 477, in run_with_paths
    self.load_hooks()
  File "/srv/openerp/.buildout/eggs/behave-1.2.3-py2.6.egg/behave/runner.py", line 437, in load_hooks
    exec_file(hooks_path, self.hooks)
  File "/srv/openerp/.buildout/eggs/behave-1.2.3-py2.6.egg/behave/runner.py", line 283, in exec_file
    execfile(filename, globals, locals)
  File "/srv/openerp/instances/openerp_7.0/Scenario/OERPScenario/features/environment.py", line 3, in <module>
    from support import tools, behave_better
  File "/srv/openerp/instances/openerp_7.0/Scenario/OERPScenario/features/support/behave_better.py", line 48, in <module>
    class PrettyFormatter(formatter.pretty.PrettyFormatter):
AttributeError: 'module' object has no attribute 'pretty'

Related branches

Changed in oerpscenario:
importance: Undecided → Critical
assignee: nobody → Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c)
Revision history for this message
Florent (florent.x) wrote :

I've a patch in my local repository (for a long time now).

I can prepare and push a pull request later today.

Revision history for this message
Florent (florent.x) wrote :

This branch should is ready for Behave 1.2.3.

bzr branch lp:~florent.x/oerpscenario/trunk-behave-better

Please test.

Revision history for this message
Florent (florent.x) wrote :
Changed in oerpscenario:
status: New → Confirmed
Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote :

Sorry for the delay.

I will take a look at your patch this week.

Thanks again.

Regards

Nicolas

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

We are facing the same problem. Has the patch been tested yet?

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

Florent,

you removed your fix?

I get this error:

bzr branch lp:~florent.x/oerpscenario/trunk-behave-better
bzr: ERROR: Invalid url supplied to transport: "bzr+ssh://bazaar.launchpad.net/~florent.x/oerpscenario/trunk-behave-better": no supported schemes

regards,
Jeroen

Onestein - Netherlands

Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote :

The patch is tested and needs a fix, it breaks support of assert helper.
Until a proper fix you have to freeze your version of behave.

Regards

Nicolas

description: updated
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

Changed in oerpscenario:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.