Skip to content

Commit 3ba74b2

Browse files
ftests/077: drop unused global and fix list sorting
flake8 reported: tests/ftests/077-pybindings-cgroup_get_procs.py:52:5: F824 is unused: name is never assigned in scope The test already appends to the module-level list, so we do not reassign it inside setup(). Drop the unused global declaration and call list.sort() without reassigning the result to keep the pid lists in order before comparing them. Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
1 parent 0962009 commit 3ba74b2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/ftests/077-pybindings-cgroup_get_procs.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ def prereqs(config):
3636

3737

3838
def setup(config):
39-
global initial_pid_list
4039
CgroupCli.create(config, CONTROLLERS, CGNAME)
4140
CgroupCli.create(config, CONTROLLERS, EMPTY_CGNAME)
4241

@@ -45,11 +44,10 @@ def setup(config):
4544
initial_pid_list.append(pid)
4645

4746
CgroupCli.classify(config, CONTROLLERS, CGNAME, initial_pid_list, ignore_systemd=True)
48-
initial_pid_list = initial_pid_list.sort()
47+
initial_pid_list.sort()
4948

5049

5150
def test(config):
52-
global initial_pid_list
5351
result = consts.TEST_PASSED
5452
cause = None
5553

0 commit comments

Comments
 (0)