STINNER Victor <vstin...@python.org> added the comment:
test_tools.test_reindent_file_with_bad_encoding() runs Tools/scripts/reindent.py. The check() function of this script calls: with open(file, 'rb') as f: try: encoding, _ = tokenize.detect_encoding(f.readline) except SyntaxError as se: errprint("%s: SyntaxError: %s" % (file, str(se))) But I don't think that the buildbot reached this line since the stderr message doesn't start with the input filename. For example, locally, I get the expected error: $ ./python Tools/scripts/reindent.py -r Lib/test/bad_coding.py; echo $? Lib/test/bad_coding.py: SyntaxError: unknown encoding for 'Lib/test/bad_coding.py': uft-8 0 ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43662> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com