I’m the author of the pfsensible.core collection. My ansible unit tests are now failing in github actions with:
[gw2] linux -- Python 3.10.16 /opt/hostedtoolcache/Python/3.10.16/x64/bin/python
self = <ansible_collections.pfsensible.core.tests.unit.plugins.modules.test_pfsense_vlan.TestPFSenseVlanModule testMethod=test_vlan_delete_unexistent>
def test_vlan_delete_unexistent(self):
""" test deletion of a vlan """
vlan = dict(vlan_id=1200, interface='vmx1')
> self.do_module_test(vlan, delete=True, changed=False)
tests/unit/plugins/modules/test_pfsense_vlan.py:122:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/unit/plugins/modules/pfsense_module.py:171: in do_module_test
result = self.execute_module(changed=changed, failed=failed, msg=msg)
tests/unit/plugins/modules/pfsense_module.py:144: in execute_module
result = self.changed(changed)
tests/unit/plugins/modules/pfsense_module.py:203: in changed
self.module.main()
plugins/modules/pfsense_vlan.py:77: in main
module = AnsibleModule(
/tmp/ansible-test-_yh7xkcf/ansible/module_utils/basic.py:416: in __init__
self._load_params()
/tmp/ansible-test-_yh7xkcf/ansible/module_utils/basic.py:1214: in _load_params
self.params = _load_params()
/tmp/ansible-test-_yh7xkcf/ansible/module_utils/basic.py:326: in _load_params
buffer = sys.stdin.buffer.read()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def read(self, size: int = -1) -> str:
> raise OSError(
"pytest: reading from stdin while output is captured! Consider using `-s`."
)
E OSError: pytest: reading from stdin while output is captured! Consider using `-s`.
/opt/hostedtoolcache/Python/3.10.16/x64/lib/python3.10/site-packages/_pytest/capture.py:227: OSError
I’ve tried adding this to setup.cfg:
[tool:pytest]
addopts = -s
to no avail.
See Workflow runs · pfsensible/core · GitHub
Any suggestions would be greatly appreciated.