Barry A. Warsaw added the comment: This just gets weirder. I've narrowed it down to running this command:
build-static/python Lib/test/regrtest.py test_doctest test_cpickle fails every time. What's even weirder is that I hacked regrtest to print some useful information before and after each test run. It prints the id(sys.modules['copy_reg']) and len(dir(sys.modules['copy_reg']))). Here's the output for two test runs. You can see that if test_doctest is run before test_cpickle, regrtest sees a different module in sys.modules['copy_reg'], but only *after* test_cpickle runs. Using test_doctest2 instead is fine. I'll note one other thing. Doko mentioned that in our build environment, cPickle is built in, not an extension. # build-static/python Lib/test/regrtest.py test_doctest test_cpickle [1/2] test_doctest ('BEFORE =====>', 140559940644712, 22) ('AFTER =====>', 140559940644712, 22) [2/2] test_cpickle ('BEFORE =====>', 140559940644712, 22) test test_cpickle failed -- multiple errors occurred; run in verbose mode for details ('AFTER =====>', 140559897320928, 5) 1 test OK. 1 test failed: test_cpickle # build-static/python Lib/test/regrtest.py test_doctest2 test_cpickle [1/2] test_doctest2 ('BEFORE =====>', 139794866929512, 22) ('AFTER =====>', 139794866929512, 22) [2/2] test_cpickle ('BEFORE =====>', 139794866929512, 22) ('AFTER =====>', 139794866929512, 22) All 2 tests OK. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25698> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com