[Python-checkins] r61777 - python/trunk/Lib/test/test_xmlrpc.py
neal.norwitz
python-checkins at python.org
Sun Mar 23 05:08:31 CET 2008
Author: neal.norwitz
Date: Sun Mar 23 05:08:30 2008
New Revision: 61777
Modified:
python/trunk/Lib/test/test_xmlrpc.py
Log:
Speed up the test by avoiding socket timeouts.
Modified: python/trunk/Lib/test/test_xmlrpc.py
==============================================================================
--- python/trunk/Lib/test/test_xmlrpc.py (original)
+++ python/trunk/Lib/test/test_xmlrpc.py Sun Mar 23 05:08:30 2008
@@ -462,12 +462,14 @@
self.fail("%s\n%s" % (e, getattr(e, "headers", "")))
def test_dotted_attribute(self):
- # this will raise AttirebuteError because code don't want us to use
- # private methods
+ # Raises an AttributeError because private methods are not allowed.
self.assertRaises(AttributeError,
SimpleXMLRPCServer.resolve_dotted_attribute, str, '__add')
self.assert_(SimpleXMLRPCServer.resolve_dotted_attribute(str, 'title'))
+ # Get the test to run faster by sending a request with test_simple1.
+ # This avoids waiting for the socket timeout.
+ self.test_simple1()
# This is a contrived way to make a failure occur on the server side
# in order to test the _send_traceback_header flag on the server
@@ -483,7 +485,7 @@
def setUp(self):
self.evt = threading.Event()
# start server thread to handle requests
- serv_args = (self.evt, 2)
+ serv_args = (self.evt, 1)
threading.Thread(target=http_server, args=serv_args).start()
# wait for the server to be ready
More information about the Python-checkins
mailing list