ansible 2.7.1
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/amarao/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /home/amarao/prg/molecule/.venv/local/lib/python2.7/site-packages/ansible
executable location = /home/amarao/prg/molecule/.venv/bin/ansible
python version = 2.7.15+ (default, Oct 2 2018, 22:12:08) [GCC 8.2.0]
molecule, version 2.19.0
Ubuntu 18.04, pip/ansible/molecule in virtualenv
Molecule installation method (one of):
Ansible installation method (one of):
pip install molecule==2.19.0
molecule init role -r test_role
molecule test
...
Skipping, side effect playbook not configured.
--> Scenario: 'default'
--> Action: 'verify'
--> Executing Testinfra tests found in /home/amarao/prg/molecule/test_role/molecule/default/tests/...
============================= test session starts ==============================
platform linux2 -- Python 2.7.15+, pytest-3.10.0, py-1.7.0, pluggy-0.8.0
rootdir: /home/amarao/prg/molecule/test_role/molecule/default, inifile:
plugins: testinfra-1.16.0
collected 1 item
Traceback (most recent call last):
File "/home/amarao/prg/molecule/.venv/bin/py.test", line 11, in <module>
sys.exit(main())
File "/home/amarao/prg/molecule/.venv/local/lib/python2.7/site-packages/_pytest/config/__init__.py", line 76, in main
return config.hook.pytest_cmdline_main(config=config)
File "/home/amarao/prg/molecule/.venv/local/lib/python2.7/site-packages/pluggy/hooks.py", line 284, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/home/amarao/prg/molecule/.venv/local/lib/python2.7/site-packages/pluggy/manager.py", line 67, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/home/amarao/prg/molecule/.venv/local/lib/python2.7/site-packages/pluggy/manager.py", line 61, in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
File "/home/amarao/prg/molecule/.venv/local/lib/python2.7/site-packages/pluggy/callers.py", line 208, in _multicall
return outcome.get_result()
File "/home/amarao/prg/molecule/.venv/local/lib/python2.7/site-packages/pluggy/callers.py", line 81, in get_result
_reraise(*ex) # noqa
File "/home/amarao/prg/molecule/.venv/local/lib/python2.7/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/home/amarao/prg/molecule/.venv/local/lib/python2.7/site-packages/_pytest/main.py", line 218, in pytest_cmdline_main
return wrap_session(config, _main)
File "/home/amarao/prg/molecule/.venv/local/lib/python2.7/site-packages/_pytest/main.py", line 211, in wrap_session
session=session, exitstatus=session.exitstatus
File "/home/amarao/prg/molecule/.venv/local/lib/python2.7/site-packages/pluggy/hooks.py", line 284, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/home/amarao/prg/molecule/.venv/local/lib/python2.7/site-packages/pluggy/manager.py", line 67, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/home/amarao/prg/molecule/.venv/local/lib/python2.7/site-packages/pluggy/manager.py", line 61, in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
File "/home/amarao/prg/molecule/.venv/local/lib/python2.7/site-packages/pluggy/callers.py", line 203, in _multicall
gen.send(outcome)
File "/home/amarao/prg/molecule/.venv/local/lib/python2.7/site-packages/_pytest/terminal.py", line 627, in pytest_sessionfinish
outcome.get_result()
File "/home/amarao/prg/molecule/.venv/local/lib/python2.7/site-packages/pluggy/callers.py", line 81, in get_result
_reraise(*ex) # noqa
File "/home/amarao/prg/molecule/.venv/local/lib/python2.7/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/home/amarao/prg/molecule/.venv/local/lib/python2.7/site-packages/_pytest/stepwise.py", line 102, in pytest_sessionfinish
self.config.cache.set("cache/stepwise", [])
AttributeError: 'Config' object has no attribute 'cache'
tests/test_default.py . [100%]
An error occurred during the test sequence action: 'verify'. Cleaning up.
Pip freeze:
ansible==2.7.1
ansible-lint==3.4.23
anyconfig==0.9.7
arrow==0.12.1
asn1crypto==0.24.0
atomicwrites==1.2.1
attrs==18.2.0
backports.functools-lru-cache==1.5
backports.ssl-match-hostname==3.5.0.1
bcrypt==3.1.4
binaryornot==0.4.4
Cerberus==1.2
certifi==2018.10.15
cffi==1.11.5
chardet==3.0.4
click==6.7
click-completion==0.3.1
colorama==0.3.9
configparser==3.5.0
cookiecutter==1.6.0
cryptography==2.3.1
docker-py==1.10.6
docker-pycreds==0.3.0
enum34==1.1.6
fasteners==0.14.1
flake8==3.5.0
funcsigs==1.0.2
future==0.17.1
git-url-parse==1.1.0
idna==2.7
ipaddress==1.0.22
Jinja2==2.10
jinja2-time==0.2.0
MarkupSafe==1.1.0
mccabe==0.6.1
molecule==2.19.0
monotonic==1.5
more-itertools==4.3.0
paramiko==2.4.2
pathlib2==2.3.2
pathspec==0.5.9
pbr==4.1.0
pexpect==4.6.0
pkg-resources==0.0.0
pluggy==0.8.0
poyo==0.4.2
psutil==5.4.6
ptyprocess==0.6.0
py==1.7.0
pyasn1==0.4.4
pycodestyle==2.3.1
pycparser==2.19
pyflakes==1.6.0
PyNaCl==1.3.0
pytest==3.10.0
python-dateutil==2.7.5
python-gilt==1.2.1
PyYAML==3.13
requests==2.20.0
scandir==1.9.0
sh==1.12.14
six==1.11.0
tabulate==0.8.2
testinfra==1.16.0
tree-format==0.1.2
urllib3==1.24.1
websocket-client==0.54.0
whichcraft==0.5.2
yamllint==1.11.1
Upd, issue is present with pytest==3.10.0, downgrade to 3.9.3 does help. molecule should pin a working version in requirements.txt, shouldn't it?
See https://github.com/pytest-dev/pytest/issues/4304 for further info
I seem to still be having this issue, but a slightly different error message.
user01@M1711732 [16:01:06] ~/Documents/development/Ansible/concourse_ci [master !]
$ molecule verify
--> Validating schema /Users/user01/Documents/development/Ansible/concourse_ci/molecule/default/molecule.yml.
Validation completed successfully.
--> Validating schema /Users/user01/Documents/development/Ansible/concourse_ci/molecule/docker_test/molecule.yml.
Validation completed successfully.
--> Test matrix
└── default
└── verify
--> Scenario: 'default'
--> Action: 'verify'
--> Executing Testinfra tests found in /Users/user01/Documents/development/Ansible/concourse_ci/molecule/default/tests/...
============================= test session starts ==============================
platform darwin -- Python 3.7.2, pytest-4.2.0, py-1.7.0, pluggy-0.8.1
rootdir: /Users/user01/Documents/development/Ansible/concourse_ci/molecule/default, inifile:
plugins: testinfra-1.16.0
collected 15 items
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/Users/user01/.pyenv/versions/3.7.2/lib/python3.7/site-packages/_pytest/main.py", line 203, in wrap_session
INTERNALERROR> session.exitstatus = doit(config, session) or 0
INTERNALERROR> File "/Users/user01/.pyenv/versions/3.7.2/lib/python3.7/site-packages/_pytest/main.py", line 242, in _main
INTERNALERROR> config.hook.pytest_collection(session=session)
INTERNALERROR> File "/Users/user01/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pluggy/hooks.py", line 284, in __call__
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "/Users/user01/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pluggy/manager.py", line 68, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/Users/user01/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pluggy/manager.py", line 62, in <lambda>
INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> File "/Users/user01/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/Users/user01/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/Users/user01/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/Users/user01/.pyenv/versions/3.7.2/lib/python3.7/site-packages/_pytest/main.py", line 252, in pytest_collection
INTERNALERROR> return session.perform_collect()
INTERNALERROR> File "/Users/user01/.pyenv/versions/3.7.2/lib/python3.7/site-packages/_pytest/main.py", line 471, in perform_collect
INTERNALERROR> hook.pytest_collection_finish(session=self)
INTERNALERROR> File "/Users/user01/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pluggy/hooks.py", line 284, in __call__
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "/Users/user01/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pluggy/manager.py", line 68, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/Users/user01/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pluggy/manager.py", line 62, in <lambda>
INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> File "/Users/user01/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/Users/user01/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/Users/user01/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/Users/user01/.pyenv/versions/3.7.2/lib/python3.7/site-packages/testinfra/plugin.py", line 183, in pytest_collection_finish
INTERNALERROR> session.config.warn('C1', msg)
INTERNALERROR> AttributeError: 'Config' object has no attribute 'warn'
========================== 8 warnings in 2.49 seconds ==========================
Can you report to pytest side @predatorian3? Or do you have an idea on a fix here?
@predatorian3 - following with same issue, downgrade to 3.9.3 fixes
Most helpful comment
See https://github.com/pytest-dev/pytest/issues/4304 for further info