]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
tests/ftest: use string filter() to concatenation cause
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Thu, 23 Feb 2023 13:45:54 +0000 (13:45 +0000)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 23 Feb 2023 17:27:56 +0000 (10:27 -0700)
commit7edd97c30dbc4fe50bf46976f87ee3f6009984bc
treef07c73b099b2fa9ce0d5ddec74aab0790facb69d
parent1394f24871c2163abd5d124fa0cbae9f4fa09e45
tests/ftest: use string filter() to concatenation cause

if, then, else construction is used to concatenate the 'cause' string,
that appends the reason for the test failures.  The reason to use the
checks to TypeError that occurs while concatenating None and str type.
Replace them with a one-liner string.filter(), across the test sources.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
(cherry picked from commit 5d4bd5c2532a7ffdbf0bab333dee4a9be4cb17ba)
tests/ftests/054-sudo-set_uid_gid_v2.py
tests/ftests/055-sudo-set_uid_gid_v1.py
tests/ftests/056-sudo-set_permissions_v2.py
tests/ftests/057-sudo-set_permissions_v1.py
tests/ftests/058-sudo-systemd_create_scope2.py