Running tox -e unit on a fresh checkout fails with the following:
$ tox -e unit
unit installed: appdirs==1.4.3,astroid==2.4.2,attrs==20.2.0,CacheControl==0.12.6,certifi==2019.11.28,chardet==3.0.4,cliff==3.4.0,cmd2==1.3.11,colorama==0.4.3,contextlib2==0.6.0,distlib==0.3.0,distro==1.4.0,extras==1.0.0,fixtures==3.0.0,flake8==3.8.4,future==0.18.2,html5lib==1.0.1,idna==2.8,ipaddr==2.2.0,isort==5.6.1,lazy-object-proxy==1.4.3,linecache2==1.0.0,lockfile==0.12.2,mccabe==0.6.1,mock==4.0.2,msgpack==0.6.2,netaddr==0.8.0,netifaces==0.10.9,packaging==20.3,pbr==5.5.0,pep517==0.8.2,pep8==1.7.1,prettytable==0.7.2,progress==1.5,pycodestyle==2.6.0,pyflakes==2.2.0,pylint==2.6.0,PyMySQL==0.10.1,pyparsing==2.4.6,pyperclip==1.8.0,python-mimeparse==1.6.0,python-subunit==1.4.0,pytoml==0.1.21,PyYAML==5.3.1,requests==2.22.0,retrying==1.3.3,six==1.14.0,stestr==3.0.1,stevedore==3.2.2,testtools==2.4.0,toml==0.10.1,traceback2==1.4.0,unittest2==1.1.0,urllib3==1.25.8,voluptuous==0.12.0,wcwidth==0.2.5,webencodings==0.5.1,wget==3.2,wrapt==1.12.1
unit run-test-pre: PYTHONHASHSEED='2141248626'
unit run-test: commands[0] | stestr run --top-dir=./tools/init/ --test-path=./tools/init/tests/
=========================
Failures during discovery
=========================
--- import errors ---
Failed to import test module: tests.test_question
Traceback (most recent call last):
File "/usr/lib/python3.8/unittest/loader.py", line 436, in _find_test_path
module = self._get_module_from_name(name)
File "/usr/lib/python3.8/unittest/loader.py", line 377, in _get_module_from_name
__import__(name)
File "/home/wolsen/work/openstack/microstack/tools/init/tests/test_question.py", line 10, in <module>
from init.questions.question import (Question, InvalidQuestion, InvalidAnswer) # noqa
File "/home/wolsen/work/openstack/microstack/tools/init/init/questions/__init__.py", line 34, in <module>
from init import cluster_tls
File "/home/wolsen/work/openstack/microstack/tools/init/init/cluster_tls.py", line 6, in <module>
from dateutil.relativedelta import relativedelta
ModuleNotFoundError: No module named 'dateutil'
================================================================================
The above traceback was encountered during test discovery which imports all the found test modules in the specified test_path.
ERROR: InvocationError for command /home/wolsen/work/openstack/microstack/.tox/unit/bin/stestr run --top-dir=./tools/init/ --test-path=./tools/init/tests/ (exited with code 100)
_____________________________________________________________________________________________________ summary _____________________________________________________________________________________________________
ERROR: unit: commands failed
Review https:/ /review. opendev. org/c/x/ microstack/ +/767646