My team just ran into an issue where neutron was not passing unit tests
when run under Python 2.6.  We tracked this down to a test support
function using collections.OrderedDict.  This was in locally forked
code, but when I compared it to upstream code, I found that the code in
upstream neutron is identical…meaning that upstream neutron cannot
possibly be passing unit tests under Python 2.6.  Yet, somehow, the
neutron reviews I've looked at are passing the Python 2.6 gate!  Any
ideas as to how this could be happening?

For the record, the problem is in neutron/tests/unit/,
in the function _get_collection_kwargs(), which uses
collections.OrderedDict.  As there's no reason to use OrderedDict here
that I can see—there's no definite order on the initialization, and all
consumers pass it to an assert_called_once_with() method with the '**'
operator—I have proposed a review[1] to replace it with a simple dict.

Kevin L. Mitchell <>

OpenStack-dev mailing list

Reply via email to