]> 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:26:24 +0000 (10:26 -0700)
commit5d4bd5c2532a7ffdbf0bab333dee4a9be4cb17ba
tree865074a58f6c6401fb2837eb7afeaeac81b6217d
parent689d7fb7105727675ba6487530903b1f7e6ef50a
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>
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