Support comments in the test ignore file (see ../files/test.exclude) diff -wpruN '--exclude=*.orig' a~/Lib/test/libregrtest/cmdline.py a/Lib/test/libregrtest/cmdline.py --- a~/Lib/test/libregrtest/cmdline.py 1970-01-01 00:00:00 +++ a/Lib/test/libregrtest/cmdline.py 1970-01-01 00:00:00 @@ -435,6 +435,7 @@ def _parse_args(args, **kwargs): ns.ignore_tests = [] with open(ns.ignore_filename) as fp: for line in fp: + if line.startswith('#'): continue ns.ignore_tests.append(line.strip()) if ns.forever: # --forever implies --failfast