Zachary Ware added the comment:

The real issue here is that the test used to determine whether -S was passed or 
not is outdated: instead of checking sys.flags.no_site, it checks whether 
'site' is in sys.modules.  This is no longer a valid test, since site's side 
effects are contained within site.main, which is only run if no_site is False.  
In fact, distutils imports symbols from site unconditionally, as do a couple of 
test modules; hence why test_site currently fails running `python -S Lib/test`: 
test_distutils (and others) run before test_site and cause site to be present 
in sys.modules.

I think we should move away from a toplevel SkipTest, though; some of the tests 
may be applicable whether -S is passed or not, though of course the 
ImportSideEffectTests would not be.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19828>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to