[openstack-dev] [oslo] why we have 2 sets of tests in oslo libraries

Doug Hellmann doug at doughellmann.com
Thu Jan 15 17:12:38 UTC 2015


> On Jan 15, 2015, at 12:01 PM, Doug Hellmann <doug at doughellmann.com> wrote:
> 
> 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
> 

The missing footnote:
[1] https://blueprints.launchpad.net/oslo-incubator/+spec/drop-namespace-packages




More information about the OpenStack-dev mailing list