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
socket.getfqdn() calls were causing all the slowness. Added a
mock_socket.py file to handle some tests. For other tests that tested
both server side and client side of the smtp libraries, mocked out
socket.getfqdn() only.
What platform is that? I'm sure I don't get such a long runtime for
test_smtplib on Linux. Maybe this was fixed by changes in socket or
smtplib itself?
richard commented on Aug 2, 2010
richardmannequin
Mannequin
More actions
The patch to test_smtplib.py no longer applies since trunk is now py3k. I'm looking into it - and seeing whether the mock socket work I implemented for test_smtpd.py will have any common code. I'm hitting some "fun" areas of py3k-ness with bytes/str stuff in smtplib at the moment though ;-)
Activity
jerryseutter commentedon Mar 19, 2008
Changes only affect test files.
test_smtplib.py before: 39.7s
test_smtplib.py after: 0.8s
socket.getfqdn() calls were causing all the slowness. Added a
mock_socket.py file to handle some tests. For other tests that tested
both server side and client side of the smtp libraries, mocked out
socket.getfqdn() only.
devdanzin commentedon May 16, 2009
What platform is that? I'm sure I don't get such a long runtime for
test_smtplib on Linux. Maybe this was fixed by changes in socket or
smtplib itself?
richard commentedon Aug 2, 2010
The patch to test_smtplib.py no longer applies since trunk is now py3k. I'm looking into it - and seeing whether the mock socket work I implemented for test_smtpd.py will have any common code. I'm hitting some "fun" areas of py3k-ness with bytes/str stuff in smtplib at the moment though ;-)
richard commentedon Aug 3, 2010
Merged mock socket from test_smtpd.py and committed.