Issue 6293: Have regrtest.py echo back sys.flags (original) (raw)

This patch makes regrtest.py echo back the contents of sys.flags at the beginning of a test run. Unladen Swallow has found this useful for verifying that the regrtest.py settings in the Makefile and in our Buildbot configs are interacting as expected.

Example output: $ PYTHONOPTIMIZE=2 ./python.exe -OO Lib/test/regrtest.py Testing with flags: sys.flags(debug=0, py3k_warning=0, division_warning=0, division_new=0, inspect=0, interactive=0, optimize=2, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, unicode=0, bytes_warning=0) test_grammar test_opcodes test_dict test_builtin test_exceptions test_types [snip] $

Hello, I've changed the initial patch to add a CLI option ('-g/--sysflags', '-f' is already used) to enable the echoing of sys.flags.

If you need some other changes, just ping me.

Regards, Sandro