R. David Murray <rdmur...@bitdance.com> added the comment: Yeah, making a generic way to put specific tests into a subprocess run sounds like a better solution.
But... The xml error in test___all__ is due to the fact that test___all__ imports site. So even with the above we'd need to special case site in test___all__. This probably answers the question of why more tests show as changing the environment when run with -S -s, so there are probably other tests that would need to be touched as well. This is becoming a bit of a jerry-rig. Anyone have a better idea? A way to identify the "system paths" (or, conversely, identify the paths *not* added by site) and delete them in regrtest before running the tests might be cleaner. Or another idea: change site so that it does not execute on import, but instead the machinery that currently imports test site runs a 'setup' function after it does the import. If test_site were then to test the setup function and take care to restore sys.path when it was done, I think things would work as expected if all tests were run with -S -s. Of course, this would break all the custom site.py's out there, so it is probably a non-starter of an idea. In the meantime, test___all__ could perhaps be made more robust in the face of import errors/warnings for those few modules that import from external libraries (xml, logging...anything else?) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1674555> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com