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 <>
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 and 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.
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: <>
2018-09-12 23:53:09gregory.p.smithlinkissue34200 messages
2018-09-12 23:53:09gregory.p.smithcreate