summaryrefslogtreecommitdiff
path: root/tests/cloud_tests
diff options
context:
space:
mode:
authorJoshua Powers <josh.powers@canonical.com>2020-06-01 14:20:39 -0700
committerGitHub <noreply@github.com>2020-06-01 17:20:39 -0400
commit4ab3303ec4bb49f029b7821d6dba53a6b02b6dc1 (patch)
treec60b8f1d4ca9735efee890042b9d32ab6bc51f7d /tests/cloud_tests
parent1211ab449bdfa34b8883c7386772155e6a516ebb (diff)
downloadvyos-cloud-init-4ab3303ec4bb49f029b7821d6dba53a6b02b6dc1.tar.gz
vyos-cloud-init-4ab3303ec4bb49f029b7821d6dba53a6b02b6dc1.zip
test: fix all flake8 E741 errors (#401)
This removes the use of variables named ‘l’, ‘O’, or ‘I’. Generally these are used in list comprehension to read the line of lines.
Diffstat (limited to 'tests/cloud_tests')
-rw-r--r--tests/cloud_tests/platforms/instances.py4
-rw-r--r--tests/cloud_tests/testcases/base.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/cloud_tests/platforms/instances.py b/tests/cloud_tests/platforms/instances.py
index 529e79cd..efc35c7f 100644
--- a/tests/cloud_tests/platforms/instances.py
+++ b/tests/cloud_tests/platforms/instances.py
@@ -132,8 +132,8 @@ class Instance(TargetBase):
"""
def clean_test(test):
"""Clean formatting for system ready test testcase."""
- return ' '.join(l for l in test.strip().splitlines()
- if not l.lstrip().startswith('#'))
+ return ' '.join(line for line in test.strip().splitlines()
+ if not line.lstrip().startswith('#'))
boot_timeout = self.config['boot_timeout']
tests = [self.config['system_ready_script']]
diff --git a/tests/cloud_tests/testcases/base.py b/tests/cloud_tests/testcases/base.py
index 7b67f54e..68d59111 100644
--- a/tests/cloud_tests/testcases/base.py
+++ b/tests/cloud_tests/testcases/base.py
@@ -141,8 +141,8 @@ class CloudTestCase(unittest.TestCase):
def test_no_warnings_in_log(self):
"""Unexpected warnings should not be found in the log."""
warnings = [
- l for l in self.get_data_file('cloud-init.log').splitlines()
- if 'WARN' in l]
+ line for line in self.get_data_file('cloud-init.log').splitlines()
+ if 'WARN' in line]
joined_warnings = '\n'.join(warnings)
for expected_warning in self.expected_warnings:
self.assertIn(