Commit Graph

15791 Commits

Author SHA1 Message Date
Senthil Kumaran 1b7f9e53b3 Fix issue8582: urllib.urlretrieve fails with ValueError: Invalid format string 2010-05-01 08:01:56 +00:00
Antoine Pitrou 54f9f83e5c Issue #8576: Remove use of find_unused_port() in test_smtplib and
test_multiprocessing.  Patch by Paul Moore.
2010-04-30 23:08:48 +00:00
Tarek Ziadé a5cd18275e Fixed #8577. distutils.sysconfig.get_python_inc() now differenciates buildir and srcdir 2010-04-30 12:15:12 +00:00
Andrew M. Kuchling ba88b7f23b Always add space after RFC; reword paragraph 2010-04-30 00:49:09 +00:00
Lars Gustäbel 5c4c4619b0 Issue #8464: tarfile.open(name, mode="w|") no longer creates
files with execute permissions set.
2010-04-29 15:23:38 +00:00
Antoine Pitrou 3945c867d6 Fix style issues in test_ssl 2010-04-28 21:11:01 +00:00
Senthil Kumaran ed9204346e Fixed Issue6312 - httplib fails with HEAD requests to pages with "transfer-encoding: chunked" 2010-04-28 17:20:43 +00:00
Nick Coghlan dfb45dfd04 Issue 7490: make IGNORE_EXCEPTION_DETAIL also ignore details of the module containing the exception under test (original patch by Lennart Regebro) 2010-04-28 14:29:06 +00:00
Victor Stinner 6a10281d33 Issue #7449, last part (11): fix many tests if thread support is disabled
* Use try/except ImportError or test_support.import_module() to import thread
   and threading modules
 * Add @unittest.skipUnless(threading, ...) to testcases using threads
2010-04-27 23:55:59 +00:00
Victor Stinner c73a05f775 Issue #7449, part 10: test_cmd imports trace module using test_support.import_module()
Use test_support.import_module() instead of import to raise a SkipTest
exception if the import fail. Import trace fails if the threading module is
missing.

See also part 3: test_doctest: import trace module in test_coverage().
2010-04-27 23:51:16 +00:00
Victor Stinner 47c884129d Partial revert of r80556 (Issue #7449, part 5, fix ctypes test)
Rewrite r80556: the thread test have to be executed just after the test on
libc_open() and so the test cannot be splitted in two functions (without
duplicating code, and I don't want to duplicate code).
2010-04-27 23:33:58 +00:00
Victor Stinner a44b5a3326 Issue #7449, part 9: fix test_xmlrpclib for missing threading module
* Skip testcases using threads if threading module is missing
 * Use "http://" instead of URL in ServerProxyTestCase if threading is missing
   because URL is not set in this case
2010-04-27 23:14:58 +00:00
Victor Stinner 09227b9111 Issue #7449, part 8: don't skip the whole test_asynchat if threading is missing
TestFifo can be executed without the threading module
2010-04-27 23:03:16 +00:00
Victor Stinner be595d336c Issue #7449, part 7: simplify threading detection in test_capi
* Skip TestPendingCalls if threading module is missing
 * Test if threading module is present or not, instead of test the presence of
   _testcapi._test_thread_state
2010-04-27 23:01:29 +00:00
Victor Stinner fd8ea99275 Issue #7449, part 6: fix test_hashlib for missing threading module
Move @test_support.reap_thread decorator from test_main() to test_threaded_hashing().
2010-04-27 22:59:35 +00:00
Antoine Pitrou 4c7bcf1194 Issue #8086: In :func:`ssl.DER_cert_to_PEM_cert()`, fix missing newline
before the certificate footer.  Patch by Kyle VanderBeek.
2010-04-27 22:03:37 +00:00
Victor Stinner 9751472001 Issue #7449, part 5: split Test.test_open() of ctypes/test/test_errno.py
* Split Test.test_open() in 2 functions: test_open() and test_thread_open()
 * Skip test_open() and test_thread_open() if we are unable to find the C
   library
 * Skip test_thread_open() if thread support is disabled
 * Use unittest.skipUnless(os.name == "nt", ...) on test_GetLastError()
2010-04-27 22:01:24 +00:00
Victor Stinner 613b4cf283 Issue #7449, part 4: skip test_multiprocessing if thread support is disabled
import threading after _multiprocessing to raise a more revelant error message:
"No module named _multiprocessing". _multiprocessing is not compiled without
thread support.
2010-04-27 21:56:26 +00:00
Victor Stinner edb9f873cf Issue #7449 part 3, test_doctest: import trace module in test_coverage()
Import trace module fail if the threading module is missing. test_coverage() is
only used if test_doctest.py is used with the -c option. This commit allows to
execute the test suite without thread support.

Move "import trace" in test_coverage() and use
test_support.import_module('trace').
2010-04-27 21:51:26 +00:00
Victor Stinner 1b4a69d79b Issue #7449, part 2: regrtest.py -j option requires thread support 2010-04-27 21:47:01 +00:00
Victor Stinner d9d147b806 Issue #7449, part 1: fix test_support.py for Python compiled without thread 2010-04-27 21:46:03 +00:00
Benjamin Peterson ae9f8bd2f9 correct signature 2010-04-27 21:19:06 +00:00
Benjamin Peterson 27737259b4 condense import 2010-04-27 21:18:30 +00:00
Benjamin Peterson fed4abcc84 fold __future__ imports 2010-04-27 21:17:22 +00:00
Benjamin Peterson 5e9cc5efed fix comment 2010-04-27 21:15:28 +00:00
Benjamin Peterson a9bd6d5ea7 reject None as the buffering argument like the C implementation does #8546 2010-04-27 21:01:54 +00:00
Antoine Pitrou 9bf5425f5f socket.error can really happen here, and fix a possible NameError 2010-04-27 13:13:26 +00:00
Antoine Pitrou db187847fb Qualify or remove or bare excepts. Simplify exception handling in places.
Remove uses of test_support.TestFailed.
2010-04-27 10:32:58 +00:00
Antoine Pitrou 435ba0cfb8 replace custom code with standard library functionality (HTTPServer.shutdown())
+ enable test that was never run (!)
+ make tests faster by lowering polling timeout
2010-04-27 09:51:18 +00:00
Antoine Pitrou 150acda57f Remove uses of find_unused_port() in test_ssl, and small cleanups 2010-04-27 08:40:51 +00:00
R. David Murray 3939dcdb72 Issue #6656: fix locale.format_string to handle escaped percents and mappings.
Refactors format_string.  Includes tests for the two problems noted in
the issue, but as far as I can see there are no other tests that confirm
that format_string conforms to normal % formatting rules.
2010-04-26 21:17:14 +00:00
Antoine Pitrou 278d665c6a When calling getpeername() in SSLSocket.__init__, only silence exceptions
caused by the "socket not connected" condition.
2010-04-26 17:23:33 +00:00
R. David Murray 3bfa883207 Issue 8325: Improve regrtest --help text. 2010-04-26 16:54:57 +00:00
Brett Cannon 3d6137962c Revert an accidental commit from r80492. 2010-04-25 23:11:51 +00:00
Brett Cannon 1994969c15 When DeprecationWarning was silenced by default, it also silenced any use of -Q
by default as well. This change fixes that by treating -Q like -3 when it comes
to DeprecationWarning; using it causes the silencing to not occur.

Fixes issue #7319.
2010-04-25 22:33:36 +00:00
Antoine Pitrou a624040d72 Issue #2302: Fix a race condition in SocketServer.BaseServer.shutdown,
where the method could block indefinitely if called just before the
event loop started running.  This also fixes the occasional freezes
witnessed in test_httpservers.
2010-04-25 21:40:32 +00:00
Antoine Pitrou 1ca8c19b65 Replace a Lock with a better suited Event. 2010-04-25 21:15:50 +00:00
Michael Foord 5c322ece96 Adding unittest.removeHandler function / decorator for removing the signal.SIGINT signal handler. With tests and docs. 2010-04-25 19:02:46 +00:00
Antoine Pitrou fc69af1562 Issue #5103: SSL handshake would ignore the socket timeout and block
indefinitely if the other end didn't respond.
2010-04-24 20:04:58 +00:00
Brian Curtin a2936cfa09 Fix #7838. Add docstrings and privatize _subprocess implementation details.
Since CREATE_NEW_* are used for the creation flags of a subprocess, they
were added to __all__. The rest of the previously exposed attributes are
now qualified by _subprocess.ATTR rather than importing *.
2010-04-24 15:40:11 +00:00
Antoine Pitrou 55841ac1a5 Make test_makefile_close a networked test (can't read() from a non-connected
socket under OS X), and skip it under Windows (where sockets can't be read()
from using their fds).
2010-04-24 10:43:57 +00:00
Georg Brandl 4341e54de8 #7507: quote "!" in pipes.quote(); it is a special character for some shells. 2010-04-24 09:08:10 +00:00
Antoine Pitrou b558f17b18 Issue #5238: Calling makefile() on an SSL object would prevent the
underlying socket from being closed until all objects get truely destroyed.
2010-04-23 23:25:45 +00:00
Antoine Pitrou dfb299bb95 Issue #7943: Fix circular reference created when instantiating an SSL
socket.  Initial patch by Péter Szabó.
2010-04-23 22:54:59 +00:00
Florent Xicluna 1273566cb7 Fix the "regrtest -s" switch. 2010-04-23 18:10:12 +00:00
Florent Xicluna 64f6c2fcab Remove ImportWarnings filters. They become obsolete after r79310, issue #8205. 2010-04-23 17:59:10 +00:00
Antoine Pitrou a5c4b5515f Issue #8108: Fix the unwrap() method of SSL objects when the socket has
a non-infinite timeout.  Also make that method friendlier with applications
wanting to continue using the socket in clear-text mode, by disabling
OpenSSL's internal readahead.  Thanks to Darryl Miles for guidance.

Issue #8108: test_ftplib's non-blocking SSL server now has proper handling
of SSL shutdowns.
2010-04-22 23:33:02 +00:00
Antoine Pitrou 9aed604fb2 Skip test on old versions of OpenSSL 2010-04-22 18:00:41 +00:00
Antoine Pitrou 60b1ee375c Temporarily display OpenSSL version in verbose run -- trying to diagnose failure on Neal's buildbot. 2010-04-22 17:44:41 +00:00
Senthil Kumaran 398246169c Changed tests to only urlparse one, which was enough, addressed Ezio's comment
on Invalid url check statement and versionchanged string in docs.
2010-04-22 12:10:13 +00:00