From f3d48000b139ec38d92da276a43a8387f76cbc89 Mon Sep 17 00:00:00 2001 From: Sean Mooney Date: Thu, 26 Aug 2021 14:16:19 +0100 Subject: Add autopep8 to tox and pre-commit autopep8 is a code formating tool that makes python code pep8 compliant without changing everything. Unlike black it will not radically change all code and the primary change to the existing codebase is adding a new line after class level doc strings. This change adds a new tox autopep8 env to manually run it on your code before you submit a patch, it also adds autopep8 to pre-commit so if you use pre-commit it will do it for you automatically. This change runs autopep8 in diff mode with --exit-code in the pep8 tox env so it will fail if autopep8 would modify your code if run in in-place mode. This allows use to gate on autopep8 not modifying patches that are submited. This will ensure authorship of patches is maintianed. The intent of this change is to save the large amount of time we spend on ensuring style guidlines are followed automatically to make it simpler for both new and old contibutors to work on nova and save time and effort for all involved. Change-Id: Idd618d634cc70ae8d58fab32f322e75bfabefb9d --- nova/tests/functional/test_servers.py | 1 + 1 file changed, 1 insertion(+) (limited to 'nova/tests/functional/test_servers.py') diff --git a/nova/tests/functional/test_servers.py b/nova/tests/functional/test_servers.py index 117bbe8a41..e77d4bf1ea 100644 --- a/nova/tests/functional/test_servers.py +++ b/nova/tests/functional/test_servers.py @@ -4546,6 +4546,7 @@ class ServerTestV256SingleCellMultiHostTestCase(ServerTestV256Common): """Happy path test where we create a server on one host, migrate it to another host of our choosing and ensure it lands there. """ + def test_migrate_server_to_host_in_same_cell(self): server = self._create_server() server = self._wait_for_state_change(server, 'ACTIVE') -- cgit v1.2.1