Issue while running py.test
XioNoX opened this issue · comments
Arzhel Younsi commented
Using fresh virtualenv with pip install -U -r requirements-dev.txt
py.test returns:
napalm-panos$ py.test
=========================================================================== test session starts ===========================================================================
platform linux2 -- Python 2.7.12+, pytest-3.0.6, py-1.4.32, pluggy-0.4.0 -- /home/xionox/napalm-panos/env/bin/python
cachedir: .cache
rootdir: /home/xionox/napalm-panos, inifile: setup.cfg
plugins: pythonpath-0.7.1, json-0.4.0, cov-2.4.0, pylama-7.3.3
collected 0 items / 1 errors
Coverage.py warning: No data was collected.
----------------------------------------- generated json report: /home/xionox/napalm-panos/report.json -----------------------------------------
---------- coverage: platform linux2, python 2.7.12-final-0 ----------
Name Stmts Miss Cover Missing
--------------------------------------------------------------
napalm_panos/__init__.py 8 8 0% 15-28
napalm_panos/panos.py 348 348 0% 14-531
napalm_panos/utils/__init__.py 0 0 100%
--------------------------------------------------------------
TOTAL 356 356 0%
================================================================================= ERRORS ==================================================================================
____________________________________________________________________________ ERROR collecting ____________________________________________________________________________
env/local/lib/python2.7/site-packages/py/_path/common.py:366: in visit
for x in Visitor(fil, rec, ignore, bf, sort).gen(self):
env/local/lib/python2.7/site-packages/py/_path/common.py:415: in gen
for p in self.gen(subdir):
env/local/lib/python2.7/site-packages/py/_path/common.py:415: in gen
for p in self.gen(subdir):
env/local/lib/python2.7/site-packages/py/_path/common.py:415: in gen
for p in self.gen(subdir):
env/local/lib/python2.7/site-packages/py/_path/common.py:415: in gen
for p in self.gen(subdir):
env/local/lib/python2.7/site-packages/py/_path/common.py:415: in gen
for p in self.gen(subdir):
env/local/lib/python2.7/site-packages/py/_path/common.py:405: in gen
if p.check(dir=1) and (rec is None or rec(p))])
env/local/lib/python2.7/site-packages/_pytest/main.py:682: in _recurse
ihook = self.gethookproxy(path)
env/local/lib/python2.7/site-packages/_pytest/main.py:587: in gethookproxy
my_conftestmodules = pm._getconftestmodules(fspath)
env/local/lib/python2.7/site-packages/_pytest/config.py:339: in _getconftestmodules
mod = self._importconftest(conftestpath)
env/local/lib/python2.7/site-packages/_pytest/config.py:375: in _importconftest
self.consider_conftest(mod)
env/local/lib/python2.7/site-packages/_pytest/config.py:398: in consider_conftest
if self.register(conftestmodule, name=conftestmodule.__file__):
env/local/lib/python2.7/site-packages/_pytest/config.py:250: in register
ret = super(PytestPluginManager, self).register(plugin, name)
env/local/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py:370: in register
self._verify_hook(hook, hookimpl)
env/local/lib/python2.7/site-packages/_pytest/config.py:239: in _verify_hook
super(PytestPluginManager, self)._verify_hook(hook, hookmethod)
env/local/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py:485: in _verify_hook
_formatdef(hookimpl.function), ", ".join(hook.argnames)))
E PluginValidationError: Plugin '/home/xionox/napalm-panos/env/lib/python2.7/site-packages/napalm_base/test/conftest.py'
E hook 'pytest_generate_tests'
E argument 'basefile' not available
E plugin definition: pytest_generate_tests(metafunc, basefile)
E available hookargs: __multicall__, metafunc
========================================================================= pytest-warning summary ==========================================================================
WC1 None [pytest] section in setup.cfg files is deprecated, use [tool:pytest] instead.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=============================================================== 1 pytest-warnings, 1 error in 0.83 seconds ================================================================
Please let me know how I could troubleshot it more.
Kirk Byers commented
I just ran "tox" on the develop branch and didn't see any issues:
py27: commands succeeded
py34: commands succeeded
py35: commands succeeded
congratulations :)
Kirk Byers commented
@XioNoX Test on the develop branch and see if it works. It looks like the 'master' branch is a bit out of date and a release needs created.
Arzhel Younsi commented
Same error :(
$ git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
nothing to commit, working tree clean
$ virtualenv env
$ source env/bin/activate
(env)$ pip install -r requirements-dev.txt
[...] (no errors)
(env)$ pip install tox
(env)$ tox
David Barroso commented
@GGabriele can you take care of this?
Kirk Byers commented
Ken Celenza commented
pytest working now