From: Stefan Metzmacher Date: Mon, 15 Jul 2024 18:14:46 +0000 (+0200) Subject: python:tests: pass bytes.decode() instead of str(bytes) to assertMultiLineEqual(... X-Git-Tag: tdb-1.4.11~136 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a3856ee4dc8ae1e4ab2f56df50a8a90f7ef33b0a;p=thirdparty%2Fsamba.git python:tests: pass bytes.decode() instead of str(bytes) to assertMultiLineEqual() to get better failure output When not equal a diff of the two strings highlighting the differences will be included this way. This is a flapping test. Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Jul 16 07:40:41 UTC 2024 on atb-devel-224 --- diff --git a/python/samba/tests/dckeytab.py b/python/samba/tests/dckeytab.py index edb8a079da0..9dee64e0cea 100644 --- a/python/samba/tests/dckeytab.py +++ b/python/samba/tests/dckeytab.py @@ -174,7 +174,8 @@ class DCKeytabTests(TestCaseInTempDir): ).communicate()[0] self.maxDiff = None # No maximum length of diffs. - self.assertMultiLineEqual(str(keytab_orig_content), str(keytab_content)) + self.assertMultiLineEqual(keytab_orig_content.decode(), + keytab_content.decode()) # Parse the first entry in the keytab with open(self.ktfile, 'rb') as bytes_kt: