rally unit tests broken with mock 4.x

Bug #1885432 reported by Thomas Goirand
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rally
New
Undecided
Unassigned

Bug Description

Hi,

It looks like the upload of Mock 4.0.2 in Debian Sid broke Rally:

https://bugs.debian.org/963381

Cheers,

Thomas

Revision history for this message
Andriy Kurilin (andreykurilin) wrote :

Hi Thomas,

First of all, I should mention that starting from Rally 3.0.0, we switched from mock to `unittests.mock` - https://github.com/openstack/rally/commit/b086b2cd502cd2c255d1b8ea3eb5592e88c4c895, so it should not affect Rally.
Also, the error itself doesn't look like mock related.

I do not know the way you are preparing env before running unittests, but as for upstream we are running tox and we specified the following pytest option - https://github.com/openstack/rally/blob/3.1.0/tox.ini#L142. To avoid usage of deprecated code, we turned all deprecation warnings into errors except those cases when the fix should be applied to another project.
I expect pytest should read this place whatever it is executed via tox or directly, but not sure that it is true.

The error you are getting shows that testresources (rally->oslo.db->testresources imports) uses the deprecated code. Strange, but I do not see that our upstream CI job triggers that kind of import and python warning. Also, I could not reproduce this locally.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.