Message125220
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?) |
|
Date |
User |
Action |
Args |
2011-01-03 19:37:46 | r.david.murray | set | recipients:
+ r.david.murray, loewis, doko, pitrou, nyb, ajaksu2, dugan, eric.araujo, Arfrever |
2011-01-03 19:37:46 | r.david.murray | set | messageid: <1294083466.7.0.360526440399.issue1674555@psf.upfronthosting.co.za> |
2011-01-03 19:37:31 | r.david.murray | link | issue1674555 messages |
2011-01-03 19:37:31 | r.david.murray | create | |
|