Commit graph

6801 commits

Author SHA1 Message Date
Benjamin Peterson
5c4e292c14 fix typo 2010-04-16 22:25:57 +00:00
Benjamin Peterson
06f06a0b2f bytearray -> type2test 2010-04-16 22:24:16 +00:00
Benjamin Peterson
e7ebdc2a61 remove check for unicode 2010-04-16 21:55:10 +00:00
Senthil Kumaran
8c6d9d7c8d Fix issue2987: RFC2732 support for urlparse (IPv6 addresses) 2010-04-16 02:46:46 +00:00
Brian Curtin
b3dde13413 Fix os.kill tests to be more robust and work with slower machines.
Rather than depending on some sleep value, start up an interpreter
as a subprocess and communicate with it. Because subprocess pipes
can't be read from until EOF and I want to read from them before that,
use ctypes to peek by using PeekNamedPipe. Once the subprocess has
written the message, then it is ready to roll and accept signals.
After that, kill it.
2010-04-15 00:40:40 +00:00
Brian Curtin
235350a142 Add a small sleep to let a subprocess start before terminating it.
David Bolen's buildbot isn't know for it's speed, and it seems that we
may have been trying to kill the subprocess before it was fully
initialized. I ran with this change on the bot itself and it seemed to work.
2010-04-14 02:24:24 +00:00
Mark Dickinson
2c4798b1fd In test_winsound, don't try to import _winreg until after checking that winsound is supported. 2010-04-13 11:37:23 +00:00
Brian Curtin
d5c50b32aa Fix #7306. Add skips to test_winsound when no default sound is configured.
These failures occur on a Windows Server 2003 machine I test on.
2010-04-13 02:25:20 +00:00
R. David Murray
1a14d3d169 Issue #7585: use tab between components in unified and context diff headers.
Instead of spaces between the filename and date (or whatever the string
is that follows the filename, if any) use tabs.  This is what the unix
'diff' command does, for example, and difflib was intended to follow
the 'standard' way of doing diffs.  This improves compatibility with
patch tools.  The docs and examples are also changed to recommended that
the date format used be the ISO 8601 format, which is what modern diff
tools emit by default.

Patch by Anatoly Techtonik.
2010-04-12 16:35:19 +00:00
Stefan Krah
9aca91d7d7 Issue #8367: Fix spurious test failure on systems without a sound card. 2010-04-12 15:21:25 +00:00
Senthil Kumaran
d10b65eb68 Adding additional examples of valid urls as per RFC 3986 (for issue8339) 2010-04-12 06:50:24 +00:00
Martin v. Löwis
5a96543b36 Re-enable all tests, to see which ones fail on the buildbots. 2010-04-12 05:22:25 +00:00
Martin v. Löwis
7f7765ce39 Issue #8330: Fix expected output in test_gdb. 2010-04-12 05:18:16 +00:00
Stefan Krah
a185839862 Fix for issues #3581, #1481 and #7650:
1. The assumptions in check_node() were too restrictive:

     - Hardware addresses with universal_local_bit=1 are valid
       (locally administered).

     - Many of the tested functions (including uuid.getnode())
       may return valid RFC 4122 random node IDs. These are pretty
       much random 48-bit values with the multicast bit set to 1.

2. _unixdll_getnode() calls _uuid_generate_time(), which may be None
   on some platforms. The resulting TypeError is now caught.
2010-04-11 15:15:54 +00:00
Benjamin Peterson
a11da59755 add test for class with no operations defined 2010-04-11 01:40:32 +00:00
Antoine Pitrou
bba8f2d10a Revert temporary commit in r79937 2010-04-10 23:32:12 +00:00
Antoine Pitrou
16e026cc94 Temporary commit of fix to issue #5380 (in order to watch buildbot response) 2010-04-10 22:43:05 +00:00
Philip Jenvey
cdd98fb463 fix PYTHONWARNINGS handling to not modify the original env value and improve
its tests
2010-04-10 20:27:15 +00:00
Jean-Paul Calderone
b60ee469cd Refactor a couple inspect module tests to remove duplicate code
The test_classify_oldstyle and test_classify_newstyle methods of
test.test_inspect.TestClassesAndFunctions were previously almost
identical (aside from irrelevant whitespace and one semantic
difference).  They now share a single helper.

Fixes issue #8363.
2010-04-10 19:59:28 +00:00
Philip Jenvey
bb66973afb adjust gc_collect for Jython 2010-04-10 19:39:07 +00:00
Nick Coghlan
14459d5b1b Fix typo in comment 2010-04-10 15:01:54 +00:00
Nick Coghlan
13623662ea Try to turn some buildbots green by allowing test_multiprocessing to pass even if it hits the sys.exc_clear code in the threading module, and improve the test coverage by making the ctypes dependencies a bit more granular (two of the cited ctypes objects don't exist on my system) 2010-04-10 14:24:36 +00:00
Antoine Pitrou
343314a11c Revert r79915 (temporary commit to check for buildbots -> the fix was successful) 2010-04-09 22:41:31 +00:00
Antoine Pitrou
9c6cd56e91 Temporarily commit fix to issue #8108, to check for buildbot response 2010-04-09 21:00:36 +00:00
Martin v. Löwis
7bc26b9be6 Issue #8348: Fix test ftp url in test_urllib2net. 2010-04-08 17:40:54 +00:00
Michael Foord
91a2c89288 Switch regrtest to use StringIO instead of cStringIO for test_multiprocessing on Windows. Issue 8333. 2010-04-08 00:04:24 +00:00
Martin v. Löwis
9a39eccfe1 Issue #8337: Disable the remaining test also for now. 2010-04-07 19:11:32 +00:00
Philip Jenvey
aebbaeb962 #7301: add the environment variable $PYTHONWARNINGS to supplement the -W
command line option
patch from Brian Curtin
2010-04-06 23:24:45 +00:00
Benjamin Peterson
3a1dfa21c2 remove a optimization that resulted in unexpected behavior #8929 2010-04-06 21:50:00 +00:00
Benjamin Peterson
22c62dd345 use skip decorator 2010-04-06 21:37:06 +00:00
Antoine Pitrou
3b4c989cfd Issue #8193: Fix test_zlib failure with zlib 1.2.4. 2010-04-06 17:21:09 +00:00
Antoine Pitrou
f9de534c21 Issue #8321: Give access to OpenSSL version numbers from the ssl module,
using the new attributes `ssl.OPENSSL_VERSION`, `ssl.OPENSSL_VERSION_INFO`
and `ssl.OPENSSL_VERSION_NUMBER`.
2010-04-05 21:35:07 +00:00
Brian Curtin
fce1d31d47 Fix a failing test on an apparently slow Windows buildbot.
On slower Windows machines, waiting 0.1 seconds can sometimes not be
enough for a subprocess to start and be ready to accept signals, causing
the test to fail. One buildbot is also choking on input()/EOFError so
that was changed to not depend on input.
2010-04-05 19:04:23 +00:00
Raymond Hettinger
e1d665a90e Classes that override __eq__ also need to define __hash__. 2010-04-05 18:53:43 +00:00
Mark Dickinson
5e0c2748fb Use a more robust infinity check in _Py_HashDouble.
This fixes a test_decimal failure on FreeBSD 8.0.  (modf apparently
doesn't follow C99 Annex F on FreeBSD.)
2010-04-05 18:07:51 +00:00
R. David Murray
0c08009708 Issue 8316: make test_gdb robust in the face of differing terminal
widths.  Patch by Dave Malcolm.
2010-04-05 16:28:49 +00:00
Philip Jenvey
034b0acdd3 fix escape_encode to return the correct consumed size 2010-04-05 02:51:51 +00:00
Raymond Hettinger
06bc0b6d2e Add tests for functools.total_ordering. 2010-04-04 22:24:03 +00:00
Raymond Hettinger
bb006cf26c Add tests for cmp_to_key.
Adopt PEP 8 compliant function name.
Factor-out existing uses cmp_to_key.
Update documentation to use internal pointers instead of external resource.
2010-04-04 21:45:01 +00:00
Mark Dickinson
fdaaa9c9d8 Issue #8300 (__index__ handling in struct.pack): Remove redundant check
and improve test coverage.  Thanks Meador Inge for the patch.
2010-04-04 08:43:04 +00:00
Ezio Melotti
a28eb1c429 Use more specific assert* methods in test_struct. 2010-04-04 07:00:02 +00:00
Raymond Hettinger
ab8b9cae7e Expand test coverage for deque.count(). 2010-04-03 22:34:15 +00:00
Benjamin Peterson
a44f393c93 import bsddb more robustly 2010-04-03 21:50:40 +00:00
Antoine Pitrou
47b1d02d85 Remove useless (?) import from r79706 2010-04-03 21:42:18 +00:00
Raymond Hettinger
5f516edd77 Add count() method to collections.deque(). 2010-04-03 18:10:37 +00:00
Benjamin Peterson
0ccc7bbb34 stop CObject deprecation warnings in test___all__ 2010-04-03 16:06:42 +00:00
Ezio Melotti
856a3be76a Use more specific assert* methods in test_decimal. 2010-04-03 14:51:00 +00:00
Mark Dickinson
4846a8e828 Issue #8300: Let struct.pack use __index__ to convert and pack non-integers.
Based on a patch by Meador Inge.
2010-04-03 14:05:10 +00:00
Mark Dickinson
b05dc00fb7 Fix a couple of issues with the test_structmembersType class in _testcapimodule
- rename to _test_structmembersType to avoid the class being automatically
   called by test_capi

 - allow space for trailing NUL in inplace_member field of all_structmembers

 - use T_STRING_INPLACE instead of T_INPLACE_STRING as keyword argument
   to _test_structmembersType initializer

 - don't attempt to initialize inplace_member field if T_STRING_INPLACE
   argument wasn't supplied.
2010-04-03 10:27:05 +00:00
Raymond Hettinger
34c35b2788 Add subtract() method to collections.Counter() objects. 2010-04-03 10:22:00 +00:00