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

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
ftests/042-cgxget-unmappable.py

index e96f51031963facf6a4e4fe64b8ac2e956d79dd8..c252efc03e0a9bc366ccada2aa0d8662bf6a0bbe 100755 (executable)
 from cgroup import Cgroup, CgroupVersion
 import consts
 import ftests
-import os
 import sys
+import os
 
 CONTROLLER = 'cpu'
 CGNAME = '042cgxget'
 SETTING = 'cpu.stat'
 
+
 def prereqs(config):
     result = consts.TEST_PASSED
     cause = None
 
     return result, cause
 
+
 def setup(config):
     Cgroup.create(config, CONTROLLER, CGNAME)
 
+
 def test(config):
     result = consts.TEST_PASSED
     cause = None
@@ -49,18 +52,22 @@ def test(config):
     else:
         requested_ver = CgroupVersion.CGROUP_V1
 
-    out = Cgroup.xget(config, cgname=CGNAME, setting=SETTING,
-                      version=requested_ver, print_headers=False,
-                      ignore_unmappable=True)
+    out = Cgroup.xget(
+                        config, cgname=CGNAME, setting=SETTING,
+                        version=requested_ver, print_headers=False,
+                        ignore_unmappable=True
+                      )
     if len(out):
         result = consts.TEST_FAILED
-        cause = "Expected cgxget to return nothing.  Received {}".format(out)
+        cause = 'Expected cgxget to return nothing.  Received {}'.format(out)
 
     return result, cause
 
+
 def teardown(config):
     Cgroup.delete(config, CONTROLLER, CGNAME)
 
+
 def main(config):
     [result, cause] = prereqs(config)
     if result != consts.TEST_PASSED:
@@ -72,6 +79,7 @@ def main(config):
 
     return [result, cause]
 
+
 if __name__ == '__main__':
     config = ftests.parse_args()
     # this test was invoked directly.  run only it