Author gregory.p.smith
Recipients LorenzMende, barry, brett.cannon, gregory.p.smith, jkloth, ncoghlan, ned.deily, pms.coder, v2m, vstinner
Date 2018-09-12.23:53:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1536796389.57.0.956365154283.issue34200@psf.upfronthosting.co.za>
In-reply-to
Content
I can make the test reliable... but I wouldn't say I fully understand the ultimate cause of the problem.

The reliability fix for test_pkg is to stop using test.support.modules_setup() and test.support.modules_cleanup() in the setUp() and tearDown() methods.

these test support functions are semi scary.  they attempt to backup and replace sys.modules contents with special case code in the cleanup function to try and avoid doing that to things that are still necessary.

running python -vvv when I could get test_pkg to fail led me looking at code paths that were being executed mid-test that i'd expect to be executed only on process startup.  locale.getpreferredencoding triggering a _bootlocale import, etc.  I don't understand why it cause the problem though.

PR to at least make the test reliable coming.
History
Date User Action Args
2018-09-12 23:53:09gregory.p.smithsetrecipients: + gregory.p.smith, barry, brett.cannon, ncoghlan, vstinner, jkloth, ned.deily, LorenzMende, v2m, pms.coder
2018-09-12 23:53:09gregory.p.smithsetmessageid: <1536796389.57.0.956365154283.issue34200@psf.upfronthosting.co.za>
2018-09-12 23:53:09gregory.p.smithlinkissue34200 messages
2018-09-12 23:53:09gregory.p.smithcreate