[openstack-dev] WARNING: upcoming dependency change to oslotest
Doug Hellmann
doug at doughellmann.com
Thu Sep 4 14:44:14 UTC 2014
Next week the Oslo team will be releasing a new version of oslotest that replaces its use of the “mox” library with “mox3". This will allow us to prepare a packaged version of oslotest that works on both python 2 and 3, which is necessary for porting some of the other Oslo libraries as well as applications which are trying to use Oslo and support python 3.
mox3 has the same API as mox, so if your test suite uses oslotest.moxstubout you shouldn’t notice any difference.
If you are using oslotest but also import mox directly in some of your test modules and do not have an explicit dependency on mox, your tests will break. There are two ways to fix them: change them to use the moxstubout module to get a mox instance or add mox to your test-requirements.txt list. The first solution, using moxstubout from oslotest, is preferred because it means your test suite is one step closer to being python 3 ready. However, updating test-requirements.txt may be a less invasive change and so it might be more expedient to use that approach for now.
Doug
More information about the OpenStack-dev
mailing list