summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncore.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #18792: Use "127.0.0.1" or "::1" instead of "localhost" as much as ↵Antoine Pitrou2013-08-211-2/+1
| | | | possible, since "localhost" goes through a DNS lookup under recent Windows versions.
* test_asyncore: wait explicitly for a thread termination (this dangling threadCharles-François Natali2013-01-131-0/+1
| | | | could be the cause of a random failure).
* Issue #16274: Fix test_asyncore on Solaris.Trent Nelson2012-10-271-2/+3
|
* Issue #16274: revert r79813:90a46f8943d0 changes to asyncore/test_asyncore.Trent Nelson2012-10-181-31/+6
| | | | The backport from 3.2 included a few things not appropriate for 2.7.
* Issue #16274: backport of 3.2's asyncore/test_asyncore to 2.7.Trent Nelson2012-10-181-6/+31
| | | | This fixes failing tests on Solaris 10.
* attempt to fix asyncore buildbot failureGiampaolo Rodola'2012-03-231-2/+7
|
* fix #10340: properly handle EINVAL on OSX and also avoid to call ↵Giampaolo Rodola'2012-03-221-0/+16
| | | | handle_connect() in case of a disconnetected socket which is not meant to connect.
* Merged revisions 88604 via svnmerge fromGiampaolo Rodolà2011-02-251-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88604 | giampaolo.rodola | 2011-02-25 21:05:48 +0100 (ven, 25 feb 2011) | 1 line (issue 11214) - fix asyncore.strerror test failure on AIX ........
* Fix asyncore test that fails on pypy by explicitly closing fileMichael Foord2011-01-161-1/+2
|
* Merged revisions 83201 via svnmerge fromGeorg Brandl2010-08-011-0/+13
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83201 | georg.brandl | 2010-07-28 10:19:35 +0200 (Mi, 28 Jul 2010) | 1 line #9354: Provide getsockopt() in asyncore file_wrapper(). Patch by Lukas Langa. ........
* Merged revisions 83183,83186 via svnmerge fromEzio Melotti2010-07-271-97/+96
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83183 | ezio.melotti | 2010-07-28 01:03:33 +0300 (Wed, 28 Jul 2010) | 1 line Use proper skips and assert* methods in test_asyncore. ........ r83186 | ezio.melotti | 2010-07-28 01:24:13 +0300 (Wed, 28 Jul 2010) | 1 line With skipUnless there is no need to add test classes conditionally. ........
* Fix issue #8573 (asyncore._strerror bug): fixed os.strerror typo; included ↵Giampaolo Rodolà2010-05-181-0/+9
| | | | NameError in the tuple of expected exception; added test case for asyncore._strerror.
* Removed the assertion that dispatcher.connected attribute must be False ↵Giampaolo Rodolà2010-05-121-6/+2
| | | | after a single connect() call. Solaris and FreeBSD buildbots failures showed how connect() can succeed even in a single call. All bo failures should definitively be fixed now.
* Issue #8490: adds a more solid test suite for asyncoreGiampaolo Rodolà2010-05-101-1/+275
|
* Fix asyncore issues 8573 and 8483: _strerror might throw ValueError; ↵Giampaolo Rodolà2010-05-061-0/+17
| | | | asyncore.__getattr__ cheap inheritance caused confusing error messages when accessing undefined class attributes; added an alias for __str__ which now is used as a fallback for __repr__
* Issue #7449, last part (11): fix many tests if thread support is disabledVictor Stinner2010-04-271-1/+6
| | | | | | * Use try/except ImportError or test_support.import_module() to import thread and threading modules * Add @unittest.skipUnless(threading, ...) to testcases using threads
* Suppress transient refleaks in test_asyncoreAntoine Pitrou2009-10-271-25/+29
|
* Adjust test_asyncore to account for intentional asyncore behavior changeR. David Murray2009-04-131-4/+1
| | | | introduced by r70934 that was causing a test failure when run under -O.
* Make test_asyncore tests match code changes introduced by theR. David Murray2009-04-111-37/+20
| | | | | fix to Issue1161031, refactoring the test to simplify it in the process.
* Fix for failing asyncore tests.Josiah Carlson2009-04-011-1/+2
|
* Issue #3759: test_asyncore.py leaked handle.Hirokazu Yamamoto2008-09-021-0/+2
| | | | Reviewed by Amaury Forgeot d'Arc
* Fixed test for asyncore.Josiah Carlson2008-07-111-3/+3
|
* Fixed bugs 760475, 953599, and 1519.Josiah Carlson2008-07-071-2/+8
|
* Run svneol.py on all sources.Martin v. Löwis2008-06-131-415/+415
|
* Fixed test to reflect new filedispatcher semantics, as well as twoJosiah Carlson2008-06-101-2/+2
| | | | NameErrors pointed out by Giampaolo.
* Applying updated patch from Issue 1736190, which addresses partialJosiah Carlson2008-06-101-0/+3
| | | | | | issues in: 909005 and 17361001, as well as completely as possible issues 539444, 760475, 777588, 889153, 953599, 1025525, 1063924, and 658749. This patch also includes doc and test updates as necessary.
* - Issue #2550: The approach used by client/server code for obtaining portsTrent Nelson2008-04-081-421/+412
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to listen on in network-oriented tests has been refined in an effort to facilitate running multiple instances of the entire regression test suite in parallel without issue. test_support.bind_port() has been fixed such that it will always return a unique port -- which wasn't always the case with the previous implementation, especially if socket options had been set that affected address reuse (i.e. SO_REUSEADDR, SO_REUSEPORT). The new implementation of bind_port() will actually raise an exception if it is passed an AF_INET/SOCK_STREAM socket with either the SO_REUSEADDR or SO_REUSEPORT socket option set. Furthermore, if available, bind_port() will set the SO_EXCLUSIVEADDRUSE option on the socket it's been passed. This currently only applies to Windows. This option prevents any other sockets from binding to the host/port we've bound to, thus removing the possibility of the 'non-deterministic' behaviour, as Microsoft puts it, that occurs when a second SOCK_STREAM socket binds and accepts to a host/port that's already been bound by another socket. The optional preferred port parameter to bind_port() has been removed. Under no circumstances should tests be hard coding ports! test_support.find_unused_port() has also been introduced, which will pass a temporary socket object to bind_port() in order to obtain an unused port. The temporary socket object is then closed and deleted, and the port is returned. This method should only be used for obtaining an unused port in order to pass to an external program (i.e. the -accept [port] argument to openssl's s_server mode) or as a parameter to a server-oriented class that doesn't give you direct access to the underlying socket used. Finally, test_support.HOST has been introduced, which should be used for the host argument of any relevant socket calls (i.e. bind and connect). The following tests were updated to following the new conventions: test_socket, test_smtplib, test_asyncore, test_ssl, test_httplib, test_poplib, test_ftplib, test_telnetlib, test_socketserver, test_asynchat and test_socket_ssl. It is now possible for multiple instances of the regression test suite to run in parallel without issue.
* Moved all of the capture_server socket setup code into the try blockFacundo Batista2007-07-281-9/+26
| | | | | | | | | so that the event gets set if a failure occurs during server setup (otherwise the test will block forever). Changed to let the OS assign the server port number, and client side of test waits for port number assignment before proceeding. The test data in DispatcherWithSendTests is also sent in multiple send() calls instead of one to make sure this works properly. [GSoC - Alan McIntyre]
* Selectively enable tests for asyncore.readwrite based on the presenceFacundo Batista2007-07-221-81/+77
| | | | | of poll support in the select module (since this is the only case in which readwrite can be called). [GSoC - Alan McIntyre]
* Added a select.select call in the test server loop to make sure theFacundo Batista2007-07-191-5/+7
| | | | | | socket is ready to be read from before attempting a read (this prevents an error 10035 on some Windows platforms). [GSoC - Alan McIntyre]
* Prevent asyncore.dispatcher tests from hanging by adding loop countersFacundo Batista2007-07-171-20/+46
| | | | | | to server & client, and by adding asyncore.close_all calls in tearDown. Also choose correct expected logging results based on the value of __debug__ [Alan McIntyre - GSoC]
* Changed the used port and commented out some tests that usesFacundo Batista2007-07-151-72/+82
| | | | | a non documented function that appers to uses resources not present in Windows.
* First version. Includes tests for helper functions: read, write,Facundo Batista2007-07-141-0/+370
_exception, readwrite, closeall, compact_traceback; and for classes dispatcher, dispatcher_with_send, and file_wrapper. [Alan McIntyre - GSoC]