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
Ezio Melotti
19c06739c5
Rephrase comment.
2010-04-22 11:53:21 +00:00
Ezio Melotti
23196a564b
#8474 : fix duplicate test in test_email.
2010-04-22 11:23:31 +00:00
Antoine Pitrou
1a9e9f282e
Forgot to add the sample certificate (followup to r80314)
2010-04-21 19:36:23 +00:00
Antoine Pitrou
c715a9ed08
Issue #8484 : Load all ciphers and digest algorithms when initializing
...
the _ssl extension, such that verification of some SSL certificates
doesn't fail because of an "unknown algorithm".
2010-04-21 19:28:03 +00:00
Tarek Ziadé
62e17ad234
shutil: removed unused import and fixed attributes names in _call_external_zip
2010-04-21 13:32:26 +00:00
Ronald Oussoren
78118992ad
Sync test_plistlib.py with plistlib.py
2010-04-21 06:00:35 +00:00
Victor Stinner
a92e81bf48
Issue #8437 : Fix test_gdb failures, patch written by Dave Malcolm
2010-04-20 22:28:31 +00:00
Tarek Ziadé
e593fad81b
removed ztar support in shutil.make_archive
2010-04-20 21:09:06 +00:00
Ronald Oussoren
8e6ca8fb19
Fix for issue 7852: the DTD for OSX Plists has changed due
...
to a change in the company name for Apple.
2010-04-20 20:59:37 +00:00
Senthil Kumaran
241a04371b
Issue2987 - Added additional Invalid URL and changed the Invalid URL checking code for better.
2010-04-20 20:37:59 +00:00
Matthias Klose
c166b4021f
fix typo in r79533, introduced by the fix for issue #8233
2010-04-20 19:45:34 +00:00
Stefan Krah
68b4e01c48
1) The timeout in the itimer tests was too low for slow or heavily
...
loaded machines.
2) Even with the increased timeout, the OS does not guarantee that
a process will get a certain amount of virtual time in 60s, so
the failure is changed to a diagnostic.
2010-04-20 07:59:10 +00:00