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

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
ftests/017-cgconfig-load_file.py

index 4a73f1ce42b322eb6142cdd7e9972f8444d99635..5f27a4ea920adc978e078260c7dd9e8b2ffd1c80 100755 (executable)
@@ -23,8 +23,8 @@
 from cgroup import Cgroup, CgroupVersion
 import consts
 import ftests
-import os
 import sys
+import os
 
 CONTROLLER = 'cpu'
 CGNAME = '017cgconfig'
@@ -43,22 +43,25 @@ CONFIG_FILE = '''group
 
 CONFIG_FILE_NAME = os.path.join(os.getcwd(), '017cgconfig.conf')
 
+
 def prereqs(config):
     result = consts.TEST_PASSED
     cause = None
 
     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
 
     return result, cause
 
+
 def setup(config):
     f = open(CONFIG_FILE_NAME, 'w')
     f.write(CONFIG_FILE)
     f.close()
 
+
 def test(config):
     Cgroup.configparser(config, load_file=CONFIG_FILE_NAME)
 
@@ -68,10 +71,12 @@ def test(config):
 
     return consts.TEST_PASSED, None
 
+
 def teardown(config):
     Cgroup.delete(config, CONTROLLER, CGNAME)
     os.remove(CONFIG_FILE_NAME)
 
+
 def main(config):
     [result, cause] = prereqs(config)
     if result != consts.TEST_PASSED:
@@ -85,6 +90,7 @@ def main(config):
 
     return [result, cause]
 
+
 if __name__ == '__main__':
     config = ftests.parse_args()
     # this test was invoked directly.  run only it