New submission from R. David Murray <rdmur...@bitdance.com>: One of the failures when regrtest is run with a read-only Lib results from test_runpy modifying sys.argv. Antoine also found cases where tests modified os.environ in issue 7055. It seems useful to have regrtest fix these kinds of environment corruptions when it can, but to also issue warnings so that the tests in questions can be fixed. In some cases the warnings might also reveal bugs in the code being tested, if the code being tested does a modification it should not be doing.
Attached is a patch that adds save/restore for os.environ and sys.argv, with warning messages. ---------- components: Tests files: regrtest_guards.patch keywords: patch messages: 93566 nosy: r.david.murray priority: normal severity: normal stage: patch review status: open title: Add some test execution environment protection to regrtest type: feature request versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file15044/regrtest_guards.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7058> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com