]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
python:tests: Use assertMultiLineEqual() to get better failure output
authorAndreas Schneider <asn@samba.org>
Mon, 15 Jul 2024 08:25:50 +0000 (10:25 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 15 Jul 2024 13:51:03 +0000 (13:51 +0000)
When not equal a diff of the two strings highlighting the differences
will be included this way.

This is a flapping test.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Jul 15 13:51:03 UTC 2024 on atb-devel-224

python/samba/tests/dckeytab.py

index 6c8a1795e0f586adc506af1c26303bdd7b3df92d..edb8a079da0fd367e07a01c9c2dbc0b2c2964b58 100644 (file)
@@ -173,7 +173,8 @@ class DCKeytabTests(TestCaseInTempDir):
             stderr=subprocess.STDOUT,
         ).communicate()[0]
 
-        self.assertEqual(keytab_orig_content, keytab_content)
+        self.maxDiff = None  # No maximum length of diffs.
+        self.assertMultiLineEqual(str(keytab_orig_content), str(keytab_content))
 
         # Parse the first entry in the keytab
         with open(self.ktfile, 'rb') as bytes_kt: