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

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

index d37f327339d0caa4d53f90b17a82f3800bcf0acd..bd709c5611509dfa3569a41ed0da677efae423f4 100755 (executable)
 from cgroup import Cgroup, CgroupVersion
 import consts
 import ftests
-import os
 import sys
+import os
 
-CONTROLLER='cpu'
-CGNAME="001cgget"
+CONTROLLER = 'cpu'
+CGNAME = '001cgget'
+SETTING = 'cpu.shares'
+VALUE = '512'
 
-SETTING='cpu.shares'
-VALUE='512'
 
 def prereqs(config):
     result = consts.TEST_PASSED
@@ -38,22 +38,26 @@ def prereqs(config):
 
     if CgroupVersion.get_version('cpu') != CgroupVersion.CGROUP_V1:
         result = consts.TEST_SKIPPED
-        cause = "This test requires the cgroup v1 cpu controller"
+        cause = 'This test requires the cgroup v1 cpu 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 +69,7 @@ def main(config):
 
     return [result, cause]
 
+
 if __name__ == '__main__':
     config = ftests.parse_args()
     # this test was invoked directly.  run only it