Issue 10971: python Lib/test/regrtest.py -R 3:3: test_zipimport_support fails (original) (raw)

Created on 2011-01-21 11:14 by vstinner, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue10971_temp_module_cleanup.diff ncoghlan,2011-02-06 15:57 Remove temp modules from module cache
Messages (5)
msg126718 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2011-01-21 11:14
"./python Lib/test/regrtest.py test_zipimport_support" pass, but not with the -R option. ---- $ ./python Lib/test/regrtest.py -R 3:3: test_zipimport_support [1/1] test_zipimport_support beginning 6 repetitions 123456 test test_zipimport_support failed -- Traceback (most recent call last): File "/home/haypo/prog/SVN/py3k/Lib/test/test_zipimport_support.py", line 96, in test_inspect_getsource_issue4223 self.assertEqual(inspect.getsource(zip_pkg.foo), test_src) File "/home/haypo/prog/SVN/py3k/Lib/inspect.py", line 693, in getsource lines, lnum = getsourcelines(object) File "/home/haypo/prog/SVN/py3k/Lib/inspect.py", line 682, in getsourcelines lines, lnum = findsource(object) File "/home/haypo/prog/SVN/py3k/Lib/inspect.py", line 530, in findsource raise IOError('could not get source code') IOError: could not get source code 1 test failed: test_zipimport_support ----
msg128063 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2011-02-06 15:57
My fix for the issues with reloading of the _ssl module meant that a couple of temporary modules weren't getting cleared out of sys.modules properly, thus confusing the second and later runs of affected tests. Attached patch adds explicit removal calls for the affected modules.
msg128064 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2011-02-06 15:57
Helps to add the patch rather than the whole file...
msg128120 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2011-02-07 14:54
Fixed for 3.2 in r88368 (no backport needed, since the older test suites didn't exhibit the original problem with the _ssl module reloading)
msg128121 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2011-02-07 14:57
(Georg reviewed the patch after I mentioned it to him on IRC)
History
Date User Action Args
2022-04-11 14:57:11 admin set github: 55180
2011-02-07 14:57:02 ncoghlan set nosy:brett.cannon, ncoghlan, vstinnermessages: +
2011-02-07 14:54:38 ncoghlan set status: open -> closedmessages: + resolution: fixednosy:brett.cannon, ncoghlan, vstinner
2011-02-06 15:58:04 ncoghlan set files: - test_zipimport_support.pynosy:brett.cannon, ncoghlan, vstinner
2011-02-06 15:57:57 ncoghlan set files: + issue10971_temp_module_cleanup.diffnosy:brett.cannon, ncoghlan, vstinnermessages: +
2011-02-06 15:57:07 ncoghlan set files: + test_zipimport_support.pynosy:brett.cannon, ncoghlan, vstinnermessages: +
2011-02-06 15:22:36 pitrou set nosy: + ncoghlan
2011-02-06 10:32:01 vstinner set nosy: + brett.cannon
2011-01-21 11:14:42 vstinner create