Message125220
| Author |
r.david.murray |
| Recipients |
Arfrever, ajaksu2, doko, dugan, eric.araujo, loewis, nyb, pitrou, r.david.murray |
| Date |
2011年01月03日.19:37:30 |
| SpamBayes Score |
1.2440604e-12 |
| Marked as misclassified |
No |
| Message-id |
<1294083466.7.0.360526440399.issue1674555@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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?) |
|