[Python-Dev] Failures in test_site.py - how to debug?

Chris Angelico rosuav at gmail.com
Fri Aug 19 18:10:36 EDT 2016


On Sat, Aug 20, 2016 at 8:07 AM, Sjoerd Job Postmus <sjoerdjob at sjec.nl> wrote:
> I'd like to re-iterate my suggestion in case it was missed: split the
> current test in 2 tests:
>
> * Running with `-S` which is for checking that by default the collections
> are not imported. (Which is what is currently tested)
> * Running without `-S` which is for checking that `site` gets imported.
>
> I hope that is clear enough. Do you see any problems with such an approach?

AIUI this wouldn't test that site is sufficiently slim. The test is
supposed to mimic normal startup, then assert that unnecessary modules
haven't been loaded. Splitting it would prove that a -S run is nice
and slim, but would allow bloat in site.py to pass unnoticed.

ChrisA


More information about the Python-Dev mailing list