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

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
ftests/023-cgset-copy_from.py

index 3a7aac547d5332a2687294341c858ecafb2e5f35..d3f22de9d67e52269c6b0f36147e3b7de33f134c 100755 (executable)
@@ -23,8 +23,8 @@
 from cgroup import Cgroup, CgroupVersion
 import consts
 import ftests
-import os
 import sys
+import os
 
 CONTROLLER = 'memory'
 SRC_CGNAME = '023cgsetsrc'
@@ -35,22 +35,25 @@ SETTINGS = ['memory.limit_in_bytes',
             'memory.swappiness']
 VALUES = ['122880', '40960', '42']
 
+
 def prereqs(config):
     result = consts.TEST_PASSED
     cause = None
 
     if CgroupVersion.get_version('memory') != CgroupVersion.CGROUP_V1:
         result = consts.TEST_SKIPPED
-        cause = "This test requires the cgroup v1 memory controller"
+        cause = 'This test requires the cgroup v1 memory controller'
         return result, cause
 
     return result, cause
 
+
 def setup(config):
     Cgroup.create(config, CONTROLLER, SRC_CGNAME)
     Cgroup.create(config, CONTROLLER, DST_CGNAME)
     Cgroup.set(config, cgname=SRC_CGNAME, setting=SETTINGS, value=VALUES)
 
+
 def test(config):
     Cgroup.set(config, cgname=DST_CGNAME, copy_from=SRC_CGNAME)
 
@@ -59,10 +62,12 @@ def test(config):
 
     return consts.TEST_PASSED, None
 
+
 def teardown(config):
     Cgroup.delete(config, CONTROLLER, SRC_CGNAME)
     Cgroup.delete(config, CONTROLLER, DST_CGNAME)
 
+
 def main(config):
     [result, cause] = prereqs(config)
     if result != consts.TEST_PASSED:
@@ -74,6 +79,7 @@ def main(config):
 
     return [result, cause]
 
+
 if __name__ == '__main__':
     config = ftests.parse_args()
     # this test was invoked directly.  run only it