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

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
ftests/003-cgget-basic_cgget_v2.py

index 1475e434d475da64a4a44ed62782a1917fc97f1a..fd81b38497a4da94de1a1da1ee9dc901db657d45 100755 (executable)
 from cgroup import Cgroup, CgroupVersion
 import consts
 import ftests
-import os
 import sys
+import os
 
-CONTROLLER='cpuset'
-CGNAME="003cgget"
+CONTROLLER = 'cpuset'
+CGNAME = '003cgget'
+
+SETTING = 'cpuset.mems'
+VALUE = '0'
 
-SETTING='cpuset.mems'
-VALUE='0'
 
 def prereqs(config):
     result = consts.TEST_PASSED
@@ -38,22 +39,26 @@ def prereqs(config):
 
     if CgroupVersion.get_version('cpuset') != CgroupVersion.CGROUP_V2:
         result = consts.TEST_SKIPPED
-        cause = "This test requires the cgroup v2 cpuset controller"
+        cause = 'This test requires the cgroup v2 cpuset controller'
 
     return result, cause
 
+
 def setup(config):
     Cgroup.create(config, CONTROLLER, CGNAME)
     Cgroup.set(config, CGNAME, SETTING, VALUE)
 
+
 def test(config):
     Cgroup.get_and_validate(config, CGNAME, SETTING, VALUE)
 
     return consts.TEST_PASSED, None
 
+
 def teardown(config):
     Cgroup.delete(config, CONTROLLER, CGNAME)
 
+
 def main(config):
     [result, cause] = prereqs(config)
     if result != consts.TEST_PASSED:
@@ -65,6 +70,7 @@ def main(config):
 
     return [result, cause]
 
+
 if __name__ == '__main__':
     config = ftests.parse_args()
     # this test was invoked directly.  run only it