Merge "Use six.moves for reloading a module"

This commit is contained in:
Zuul 2019-06-25 04:57:15 +00:00 committed by Gerrit Code Review
commit 5db778cfcc
2 changed files with 2 additions and 3 deletions

View File

@ -12,6 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import six
import sys
import mock
@ -26,4 +27,4 @@ if not ironic_python_agent:
ipa_mock.hardware.GenericHardwareManager = mock.MagicMock
mock.MagicMock.erase_devices = mock.MagicMock(name='erase_devices')
if 'proliantutils.ipa_hw_manager' in sys.modules:
reload(sys.modules['proliantutils.ipa_hw_manager'])
six.moves.reload_module('proliantutils.ipa_hw_manager')

View File

@ -13,7 +13,6 @@ deps = -r{toxinidir}/test-requirements.txt
commands = stestr run {posargs}
[testenv:pep8]
basepython = python2.7
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
@ -24,7 +23,6 @@ commands =
# After running this target, visit proliantutils/cover/index.html
# in your browser, to see a nicer presentation report with annotated
# HTML listings detailing missed lines.
basepython = python2.7
setenv = VIRTUAL_ENV={envdir}
LANGUAGE=en_US
PYTHON=coverage run --source proliantutils --omit='*tests*' --parallel-mode