Closed ghost closed 1 month ago
I am getting this too. I downgraded to pytest-bdd 2.16.0 and it worked fine. I am using Python 2.7.13 on Windows 10.
I've had a little look and the commit that causes this behaviour to begin for me is: be79c1d534634baeacddb1098e97988c9df8e9fb
I've had a little look and put in some debug. It looks like pytest registers the module under test during setup and then it gets registered again during pytest-bdd running and this causes the error. I can't see why though.
@pouledodue is it still a case with the newest bdd?
I get this error with the latest version of pytest-bdd (3.0.1) and pytest (4.1.0)
lib/python3.7/site-packages/pluggy/manager.py", line 80, in register % (plugin_name, plugin, self._name2plugin) ValueError: Plugin already registered: session=
I likewise get this error with pytest-bdd-3.1.0 and pytest 4.4.1. Nothing else in my virtualenv.
Are there any news? It's still happen using pytest-bdd-3.1.1 and pytest 5.0.1
I think I found the issue and posted a comment to that effect. https://github.com/pytest-dev/pytest-bdd/commit/be79c1d534634baeacddb1098e97988c9df8e9fb#r34811134
I will post a pull request shortly
I think I found the issue. But I wonder how useful it is since the command doesn't seem to actually generate the template files. It just prints what the templates should be.
@youtux is the resolved by the PR that was merged?
👍
When generating missing
--generate-missing --feature
all works good with
Python 2.7.12, pytest-2.9.2, py-1.4.32, pluggy-0.3.1, pytest-bdd-2.16.0
but when I do same thing with
Python 2.7.12, pytest-2.9.2, py-1.4.32, pluggy-0.3.1, pytest-bdd-2.16.1
or the latest 2.18.1I get:
.7/site-packages/_pytest/vendored_packages/pluggy.py", line 350, in register (plugin_name, plugin, self._name2plugin)) ValueError: Plugin already registered: session
also fails with bdd-2.18.1 + pytest 3.0.5