The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.
Note that https://github.com/openstack/charms.openstack is used during tests
and he need `mock`, unfortunatelly it doesn't declare `mock` in its
requirements so it retrieve mock from other charm project (cross dependency).
So we depend on charms.openstack first and when
Ib1ed5b598a52375e29e247db9ab4786df5b6d142 will be merged then CI
will pass without errors.
Depends-On: Ib1ed5b598a52375e29e247db9ab4786df5b6d142
Change-Id: Iaf7949e304a6e11ff0ac47875bec69c7ccb2d621
Removing sitepackages in tox.ini to avoid test env pollution and
skip_missing_interpreters in tox.ini set to False to avoid false
positives by skipping missing interpreters.
Change-Id: I56991549c33e21d369fe8355558a29c812e09290
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.
See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html
Note that python35-charm-jobs is retained since this charm is supported
on Xenial.
Change-Id: I3db9bd4e4b3b09b321f250eaa1bf33f6c7e3a229
Story: #2005924
Task: #34228
Unit tests generally will all be executed, and measuring them will
skew the overall coverage numbers. Thus, I'm excluding the unit_tests
folder.
Change-Id: I9efa8c8c0d16047112e34d7e3b598060bf970567
This technique was borrowed from the tox "cover" environment in
openstack/nova's tox.ini. This leverages the fact that stestr lets
you override the python executable via the PYTHON environment
variable. Doing this allows us to easily generate coverage for our
unit tests.
An important caveat is that this does not provide any coverage for
tests via zaza, amulet, etc. It is purely focused on the unit tests.
Note that this replaces the previous .coveragerc; coverage
configuration is instead pulled from tox.ini.
Change-Id: I4056a0afd0a09d6d7e45b443c13fd39fa41fa3c0
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: I1f1a91cd78dadae85246cb10b8f3cea424d67ca3
Signed-off-by: Doug Hellmann <doug@doughellmann.com>