diff options
author | Joshua Powers <josh.powers@canonical.com> | 2020-06-01 14:20:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-01 17:20:39 -0400 |
commit | 4ab3303ec4bb49f029b7821d6dba53a6b02b6dc1 (patch) | |
tree | c60b8f1d4ca9735efee890042b9d32ab6bc51f7d /tests/unittests/test_ds_identify.py | |
parent | 1211ab449bdfa34b8883c7386772155e6a516ebb (diff) | |
download | vyos-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/unittests/test_ds_identify.py')
-rw-r--r-- | tests/unittests/test_ds_identify.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/unittests/test_ds_identify.py b/tests/unittests/test_ds_identify.py index f0e96b44..c2318570 100644 --- a/tests/unittests/test_ds_identify.py +++ b/tests/unittests/test_ds_identify.py @@ -611,8 +611,10 @@ class TestDsIdentify(DsIdentifyBase): ret = self._check_via_dict( cust, RC_FOUND, func=".", args=[os.path.join(rootd, mpp)], rootd=rootd) - line = [l for l in ret.stdout.splitlines() if l.startswith(pre)][0] - toks = line.replace(pre, "").split(":") + match = [ + line for line in ret.stdout.splitlines() if line.startswith(pre) + ][0] + toks = match.replace(pre, "").split(":") expected = ["/sbin", "/bin", "/usr/sbin", "/usr/bin", "/mycust/path"] self.assertEqual(expected, [p for p in expected if p in toks], "path did not have expected tokens") |