New issue 609: Problem with "plugin already registered" on Raspbian
https://bitbucket.org/hpk42/pytest/issue/609/problem-with-plugin-already-registered-on

Charlie Clark:

Hi,

I get a weird failure when I run py.test on my project on a RaspberryPi without 
explicitly passing in the [project](https://bitbucket.org/openpyxl/openpyxl) so

`py.test` fails
`py.test openpyxl` runs fine

I've manually updated pip, setuptools and virtualenv on the box but that 
doesn't seem to make much difference. But I suspect it's probably something to 
do with the Python .deb package.

I can't reproduce the behaviour on a different Debian system.

```
#!python

(openpyxl)openpyxl@Flay ~/openpyxl $ py.test -xrf
============================================================ test session 
starts =============================================================
platform linux2 -- Python 2.7.3 -- py-1.4.25 -- pytest-2.6.3
collected 0 items / 1 errors

=================================================================== ERRORS 
===================================================================
_____________________________________________________________ ERROR collecting 
. _____________________________________________________________
local/lib/python2.7/site-packages/py/_path/common.py:331: in visit
    for x in Visitor(fil, rec, ignore, bf, sort).gen(self):
local/lib/python2.7/site-packages/py/_path/common.py:377: in gen
    for p in self.gen(subdir):
local/lib/python2.7/site-packages/py/_path/common.py:367: in gen
    if p.check(dir=1) and (rec is None or rec(p))])
local/lib/python2.7/site-packages/_pytest/main.py:628: in _recurse
    ihook.pytest_collect_directory(path=path, parent=self)
local/lib/python2.7/site-packages/_pytest/main.py:166: in call_matching_hooks
    plugins = self.config._getmatchingplugins(self.fspath)
local/lib/python2.7/site-packages/_pytest/config.py:688: in _getmatchingplugins
    plugins += self._conftest.getconftestmodules(fspath)
local/lib/python2.7/site-packages/_pytest/config.py:521: in getconftestmodules
    mod = self.importconftest(conftestpath)
local/lib/python2.7/site-packages/_pytest/config.py:554: in importconftest
    self._onimport(mod)
local/lib/python2.7/site-packages/_pytest/config.py:674: in _onimportconftest
    self.pluginmanager.consider_conftest(conftestmodule)
local/lib/python2.7/site-packages/_pytest/core.py:201: in consider_conftest
    if self.register(conftestmodule, name=conftestmodule.__file__):
local/lib/python2.7/site-packages/_pytest/core.py:95: in register
    name, plugin, self._name2plugin))
E   ValueError: Plugin already registered: 
/home/openpyxl/openpyxl/openpyxl/conftest.pyc=<module 'openpyxl.conftest' from 
'/home/openpyxl/openpyxl/openpyxl/conftest.pyc'>
E   {'helpconfig': <module '_pytest.helpconfig' from 
'/home/openpyxl/openpyxl/local/lib/python2.7/site-packages/_pytest/helpconfig.pyc'>,
 'pytestconfig': <_pytest.config.Config object at 0xb683e610>, 'runner': 
<module '_pytest.runner' from 
'/home/openpyxl/openpyxl/local/lib/python2.7/site-packages/_pytest/runner.pyc'>,
 'unittest': <module '_pytest.unittest' from 
'/home/openpyxl/openpyxl/local/lib/python2.7/site-packages/_pytest/unittest.pyc'>,
 'pastebin': <module '_pytest.pastebin' from 
'/home/openpyxl/openpyxl/local/lib/python2.7/site-packages/_pytest/pastebin.pyc'>,
 'skipping': <module '_pytest.skipping' from 
'/home/openpyxl/openpyxl/local/lib/python2.7/site-packages/_pytest/skipping.pyc'>,
 'genscript': <module '_pytest.genscript' from 
'/home/openpyxl/openpyxl/local/lib/python2.7/site-packages/_pytest/genscript.pyc'>,
 'session': <Session 'openpyxl'>, 'tmpdir': <module '_pytest.tmpdir' from 
'/home/openpyxl/openpyxl/local/lib/python2.7/site-packages/_pytest/tmpdir.pyc'>,
 'cap
 ture': <module '_pytest.capture' from 
'/home/openpyxl/openpyxl/local/lib/python2.7/site-packages/_pytest/capture.pyc'>,
 'terminalreporter': <_pytest.terminal.TerminalReporter instance at 0x96c738>, 
'assertion': <module '_pytest.assertion' from 
'/home/openpyxl/openpyxl/local/lib/python2.7/site-packages/_pytest/assertion/__init__.pyc'>,
 'mark': <module '_pytest.mark' from 
'/home/openpyxl/openpyxl/local/lib/python2.7/site-packages/_pytest/mark.pyc'>, 
'terminal': <module '_pytest.terminal' from 
'/home/openpyxl/openpyxl/local/lib/python2.7/site-packages/_pytest/terminal.pyc'>,
 'main': <module '_pytest.main' from 
'/home/openpyxl/openpyxl/local/lib/python2.7/site-packages/_pytest/main.pyc'>, 
'nose': <module '_pytest.nose' from 
'/home/openpyxl/openpyxl/local/lib/python2.7/site-packages/_pytest/nose.pyc'>, 
'python': <module '_pytest.python' from 
'/home/openpyxl/openpyxl/local/lib/python2.7/site-packages/_pytest/python.pyc'>,
 'recwarn': <module '_pytest.recwarn' from '/home/openpyxl/o
 penpyxl/local/lib/python2.7/site-packages/_pytest/recwarn.pyc'>, 'funcmanage': 
<_pytest.python.FixtureManager instance at 0x977878>, 'monkeypatch': <module 
'_pytest.monkeypatch' from 
'/home/openpyxl/openpyxl/local/lib/python2.7/site-packages/_pytest/monkeypatch.pyc'>,
 'resultlog': <module '_pytest.resultlog' from 
'/home/openpyxl/openpyxl/local/lib/python2.7/site-packages/_pytest/resultlog.pyc'>,
 '3062060720': <_pytest.config.PytestPluginManager object at 0xb68356b0>, 
'capturemanager': <_pytest.capture.CaptureManager instance at 0x864f08>, 
'junitxml': <module '_pytest.junitxml' from 
'/home/openpyxl/openpyxl/local/lib/python2.7/site-packages/_pytest/junitxml.pyc'>,
 'doctest': <module '_pytest.doctest' from 
'/home/openpyxl/openpyxl/local/lib/python2.7/site-packages/_pytest/doctest.pyc'>,
 'pdb': <module '_pytest.pdb' from 
'/home/openpyxl/openpyxl/local/lib/python2.7/site-packages/_pytest/pdb.pyc'>, 
'/home/openpyxl/openpyxl/openpyxl/conftest.pyc': <module 'openpyxl.conftest' 
from
  '/home/openpyxl/openpyxl/openpyxl/conftest.pyc'>}
========================================================== 1 error in 22.09 
seconds ==========================================================
```


_______________________________________________
pytest-commit mailing list
pytest-commit@python.org
https://mail.python.org/mailman/listinfo/pytest-commit

Reply via email to