You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"./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_issue4223self.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 findsourceraiseIOError('could not get source code')
IOError: could not get source code
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.
Activity
vstinner commentedon Jan 21, 2011
"./python Lib/test/regrtest.py test_zipimport_support" pass, but not with the -R option.
----
1 test failed:
test_zipimport_support
----
ncoghlan commentedon Feb 6, 2011
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.
ncoghlan commentedon Feb 6, 2011
Helps to add the patch rather than the whole file...
ncoghlan commentedon Feb 7, 2011
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)
ncoghlan commentedon Feb 7, 2011
(Georg reviewed the patch after I mentioned it to him on IRC)