As part of the work on dropping the use of the oslo namespace [1], many of our 
library repositories now have 2 sets of tests. One set is under the new package 
(for example, “oslo_config/tests”), and uses the new import scheme (“from 
oslo_config import cfg”). To protect against regressions in the old public API, 
we have kept the original copies of the tests in a directory at the top level 
of the repository using the old import names (“from oslo.config import cfg”). 
The logic of most of the tests are identical now, aside from differences in the 
imports.

For new code, we only need to add tests in the new location inside the library 
package (“oslo_config/tests”). New symbols do not need to work through the old 
namespace, so using a new function or class may require updating imports in a 
consuming project.

The tests for the old public API should not be modified, except as we find 
redundancy that we can delete for testing private symbols. I did clean up some 
of the tests as I went along, but in a lot of cases it was faster to just 
update the imports. After we have all of the libraries released, I plan to 
spend more time going through the test suites and cleaning them up carefully, 
but that’s not a high priority task.

My goal is to be able to remove both the old namespace package and the related 
tests during the next cycle. We will have to check adoption progress as we get 
close to the end of Kilo to determine whether that is possible. Liaisons, 
please assume that we’re going to try to do it and work on updating all 
consuming projects.

Doug


__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to