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

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
ftests/043-cgcreate-empty_controller.py

index f7d19cb703e6b9ce5c390397613e76e635d63305..5d5e79fc4bfbe0cc1dd265c37545171043331cb7 100755 (executable)
 from cgroup import Cgroup, CgroupVersion
 import consts
 import ftests
-import os
 import sys
+import os
 
 # Which controller isn't all that important, but it is important that we
 # have a cgroup v2 controller
 CONTROLLER = 'cpu'
-CGNAME = "043cgcreate"
+CGNAME = '043cgcreate'
+
 
 def prereqs(config):
     result = consts.TEST_PASSED
@@ -37,13 +38,15 @@ def prereqs(config):
 
     if CgroupVersion.get_version(CONTROLLER) != CgroupVersion.CGROUP_V2:
         result = consts.TEST_SKIPPED
-        cause = "This test requires cgroup v2"
+        cause = 'This test requires cgroup v2'
 
     return result, cause
 
+
 def setup(config):
     return consts.TEST_PASSED, None
 
+
 def test(config):
     result = consts.TEST_PASSED
     cause = None
@@ -51,15 +54,19 @@ def test(config):
     Cgroup.create(config, None, CGNAME)
 
     # verify the cgroup exists by reading cgroup.procs
-    Cgroup.get(config, controller=None, cgname=CGNAME,
-               setting="cgroup.procs", print_headers=True,
-               values_only=False)
+    Cgroup.get(
+                config, controller=None, cgname=CGNAME,
+                setting='cgroup.procs', print_headers=True,
+                values_only=False
+              )
 
     return result, cause
 
+
 def teardown(config):
     Cgroup.delete(config, None, CGNAME)
 
+
 def main(config):
     [result, cause] = prereqs(config)
     if result != consts.TEST_PASSED:
@@ -74,6 +81,7 @@ def main(config):
 
     return [result, cause]
 
+
 if __name__ == '__main__':
     config = ftests.parse_args()
     # this test was invoked directly.  run only it