From df161e5cbe5da6492c62f727e16edbedcb9602a3 Mon Sep 17 00:00:00 2001 From: rabi Date: Fri, 23 Dec 2022 12:30:43 +0530 Subject: [PATCH] Remove tox skipdist=True This does not work with latest tox 4.x. Also fixes few other issues in tox.ini. This also includes I1c2289a1cff56a4f9a0ecf9aec81765e1046a4b5. Closes-Bug: #2000357 Change-Id: Ia3fe0e1de08f47ec434d04a5baae2b476132be19 (cherry picked from commit 254ff2bd1ccc2c9c4afe61ed617df22448652a3e and 7759985e8dfb339eec23a309762c6be825fb1060) --- tox.ini | 11 +++++------ .../modules/test_tripleo_overcloud_network_extract.py | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/tox.ini b/tox.ini index bd650abfb..92f496b16 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,6 @@ [tox] minversion = 3.18.0 envlist = docs,linters -skipsdist = True [testenv] usedevelop = True @@ -50,13 +49,12 @@ deps = bindep commands = bindep test [testenv:linters] -skipsdist = True skip_install = True sitepackages = False deps = pre-commit virtualenv - -r {toxinidir}/ansible-requirements.txt + -r {toxinidir}/ansible-requirements.txt commands = bash -c "ANSIBLE_ROLES_PATH='{toxinidir}/tripleo_ansible/roles.galaxy' \ ansible-galaxy install -fr {toxinidir}/tripleo_ansible/requirements.yml" @@ -92,8 +90,9 @@ commands = {posargs} [testenv:pep8] description = "[deprecated], use linters instead." deps = -commands = true -skipsdist = True + {[testenv:linters]deps} +commands = + {[testenv:linters]commands} skip_install = True sitepackages = False @@ -111,7 +110,7 @@ commands = cd {toxinidir}/tripleo_ansible/roles/skeleton_test; \ molecule --base-config {toxinidir}/.config/molecule/config_podman.yml test --all; \ else \ - echo -e '\n\nNo molecule tests have been executed\nSee https://docs.openstack.org/tripleo-ansible/latest/contributing.html#local-testing-of-new-roles\n\n'; \ + echo -e '\n\nNo molecule tests have been executed\nSee https://docs.openstack.org/tripleo-ansible/latest/contributing.html\n\n'; \ fi" {[testenv:linters]commands} diff --git a/tripleo_ansible/tests/modules/test_tripleo_overcloud_network_extract.py b/tripleo_ansible/tests/modules/test_tripleo_overcloud_network_extract.py index 0f58695c0..e459346dc 100644 --- a/tripleo_ansible/tests/modules/test_tripleo_overcloud_network_extract.py +++ b/tripleo_ansible/tests/modules/test_tripleo_overcloud_network_extract.py @@ -237,8 +237,8 @@ class TestTripleoOvercloudNetworkExtract(tests_base.TestCase): self.assertEqual(name, 'public_subnet') self.assertEqual(expected, subnet) - @mock.patch.object(plugin, 'get_subnet_info', auto_spec=True) - @mock.patch.object(plugin, 'get_network_info', auto_spec=True) + @mock.patch.object(plugin, 'get_subnet_info', autospec=True) + @mock.patch.object(plugin, 'get_network_info', autospec=True) @mock.patch.object(openstack.connection, 'Connection', autospec=True) def test_parse_net_resources(self, conn_mock, mock_get_network, mock_get_subnet):