From: Volker Lendecke Date: Thu, 5 Sep 2024 11:06:23 +0000 (+0200) Subject: tests: Improve the error message for bad format chars X-Git-Tag: tdb-1.4.13~1234 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8f115c616d1edc7c68ecbc0c04b13ede25abab9a;p=thirdparty%2Fsamba.git tests: Improve the error message for bad format chars Print the faulty character for easier finding it. I did not find out how to split the format string into two lines such that self.fail would properly print the whole thing in its exception, so we have a long line here. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/python/samba/tests/source_chars.py b/python/samba/tests/source_chars.py index 46130888cbc..dea7fcc9819 100755 --- a/python/samba/tests/source_chars.py +++ b/python/samba/tests/source_chars.py @@ -241,7 +241,7 @@ class CharacterTests(TestCase): dirs = set() for c in set(s): if is_bad_char(c): - self.fail(f"{name} has potentially bad format characters!") + self.fail(f"{name} has potentially bad format character {ord(c[0])}!") dirs.add(u.bidirectional(c)) if 'L' in dirs and 'R' in dirs: