[New-bugs-announce] [issue7058] Add some test execution environment protection to regrtest

R. David Murray report at bugs.python.org
Mon Oct 5 01:08:33 CEST 2009

New submission from R. David Murray <rdmurray at 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 <report at bugs.python.org>

More information about the New-bugs-announce mailing list