4522a9728e

This unittest-compatible load_tests function was not well organized for package-level tests and was broken for module-level usage; as in the case of module-level usage, the "pattern" parameter was being passed, which was unexpected since the Python 2.7 documentation for unittest claims it will be None. However, we are using subunit to run tests, which uses the unittest2 library that achieves compatibility with Python 3 - in Python 3, the documentation was changed here to note that "pattern" may be present (and in fact it is). Instead, break it into optimize_package_test_loader and optimize_module_test_loader. The former assumes placement inside of __init__.py only and the latter assumes placement inside of a specific module only. The issue with this function was observed when trying to get OptimisingTestSuite to work correctly with neutron; tests would be duplicated due to the double-search. In local testing it was shown that the function could cause recursion overflows. It has been observed that using this function at the module level is of great use when running subsets of tests, since the package-level load_tests function is not consulted unless the test run is package-wide. Change-Id: I267fd2fbc16504c11addef870fc8d4fc500da7d9
oslo.db -- OpenStack Database Pattern Library
The oslo db (database) handling library, provides database connectivity to different database backends and various other helper utils.
- Free software: Apache license
- Documentation: http://docs.openstack.org/developer/oslo.db
- Source: http://git.openstack.org/cgit/openstack/oslo.db
- Bugs: http://bugs.launchpad.net/oslo.db
Description
Languages
Python
99.6%
Shell
0.4%