diff options
author | Stephen Finucane <stephenfin@redhat.com> | 2022-04-05 11:24:49 +0100 |
---|---|---|
committer | Stephen Finucane <stephenfin@redhat.com> | 2022-04-05 12:59:12 +0100 |
commit | b082d06cbccd06bd49d9aa2a35ea922190e42cc5 (patch) | |
tree | 6c74932c7ca5bc9ee0f00d55397d068910a70f8d /nova/tests/unit/test_hacking.py | |
parent | b0851b0e9c82446aec2ea0317514766fbc53abc0 (diff) | |
download | nova-b082d06cbccd06bd49d9aa2a35ea922190e42cc5.tar.gz |
hacking: Prevent use of six
Spotted this in a review recently. We don't want people using six
anymore.
Change-Id: Ie107a95bc06390ab519d3b3af9b07103a9a14316
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Diffstat (limited to 'nova/tests/unit/test_hacking.py')
-rw-r--r-- | nova/tests/unit/test_hacking.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/nova/tests/unit/test_hacking.py b/nova/tests/unit/test_hacking.py index 03b7692217..e5a6efb0ad 100644 --- a/nova/tests/unit/test_hacking.py +++ b/nova/tests/unit/test_hacking.py @@ -1020,3 +1020,13 @@ class HackingTestCase(test.NoDBTestCase): nova_utils.ReaderWriterLock() """ self._assert_has_no_errors(code, checks.check_lockutils_rwlocks) + + def test_check_six(self): + code = """ + import six + from six import moves + from six.moves import range + import six.moves.urllib.parse as urlparse + """ + errors = [(x + 1, 0, 'N370') for x in range(4)] + self._assert_has_errors(code, checks.check_six, expected_errors=errors) |