]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
test-029: make it PEP8 compliant
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Tue, 15 Feb 2022 07:23:11 +0000 (12:53 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Wed, 16 Feb 2022 19:09:18 +0000 (12:09 -0700)
Make test 029-lssubsys-basic_lssubsys.py PEP-8 compliant.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
ftests/029-lssubsys-basic_lssubsys.py

index 5e6c022dd9bc864240038e4112ecc98892a254c1..185df5ea4f3ce15935c60063296ed223bacb11ba 100755 (executable)
@@ -23,9 +23,9 @@
 from cgroup import Cgroup, CgroupVersion
 import consts
 import ftests
-import os
 import sys
-import utils
+import os
+
 
 def prereqs(config):
     result = consts.TEST_PASSED
@@ -33,9 +33,11 @@ def prereqs(config):
 
     return result, cause
 
+
 def setup(config):
     pass
 
+
 def test(config):
     result = consts.TEST_PASSED
     cause = None
@@ -49,7 +51,7 @@ def test(config):
         if mount.version == CgroupVersion.CGROUP_V2:
             continue
 
-        if mount.controller == "name=systemd" or mount.controller == "systemd":
+        if mount.controller == 'name=systemd' or mount.controller == 'systemd':
             continue
 
         found = False
@@ -66,15 +68,19 @@ def test(config):
 
         if not found:
             result = consts.TEST_FAILED
-            cause = "Failed to find {} in lssubsys list".format(
-                      mount.controller)
+            cause = (
+                        'Failed to find {} in lssubsys list'
+                        ''.format(mount.controller)
+                    )
             return result, cause
 
     return result, cause
 
+
 def teardown(config):
     pass
 
+
 def main(config):
     [result, cause] = prereqs(config)
     if result != consts.TEST_PASSED:
@@ -88,6 +94,7 @@ def main(config):
 
     return [result, cause]
 
+
 if __name__ == '__main__':
     config = ftests.parse_args()
     # this test was invoked directly.  run only it