Commit Graph

8149 Commits

Author SHA1 Message Date
Raymond Hettinger 686b14d7ad SF bug #730296: Unexpected Changes in list Iterator
Reverted a Py2.3b1 change to iterator in subclasses of list and tuple.
They had been changed to use __getitem__ whenever it had been overriden
in the subclass.

This caused some usabilty and performance problems.  Also, it was
inconsistent with the rest of python where many container methods
access the underlying object directly without first checking for
an overridden getter.  Users needing a change in iterator behavior
should override it directly.
2003-05-07 01:28:47 +00:00
Greg Ward a409f7c491 SF #596434: tweak wordsep_re so the definition of an em-dash is
stricter: specifically, "--" must be preceded by a limited set of
characters, not by any non-whitespace character.
2003-05-07 01:20:58 +00:00
Greg Ward cc55cb9539 SF #596434: add test_funky_parens() to probe some more of the tricky
edge cases that David Goodger reported long ago (July 2002?).
2003-05-07 01:19:22 +00:00
Greg Ward 21820cd925 SF #726446: raise ValueError if width <= 0. 2003-05-07 00:55:35 +00:00
Greg Ward 49128575e8 SF #726446: ensure wrap() raises ValueError when width <= 0. 2003-05-07 00:54:42 +00:00
Skip Montanaro 02cd36580f detect old version 2 hash files and return "bsddb185" as the appropriate
module to load them
2003-05-06 20:42:10 +00:00
Skip Montanaro 6967f2c2e9 don't need to worry about file endianness 2003-05-06 20:37:56 +00:00
Skip Montanaro f0776d2992 Data file for bsddb185 test 2003-05-06 20:37:25 +00:00
Skip Montanaro 46f4e79aaf test case for bsddb185 module 2003-05-06 20:36:57 +00:00
Skip Montanaro 823ba28b0d the new bsddb185 module is an expected skip on most platforms (this may not
be needed - just being anal)
2003-05-06 20:36:24 +00:00
Skip Montanaro 1a56665e39 add not-yet-supported Unicode test just so it doesn't get lost. 2003-05-06 15:56:05 +00:00
Jack Jansen c7c78ae531 Allow for Version, Flavor and Download-URL not being set. 2003-05-06 13:07:32 +00:00
Jack Jansen 705553acab When doing a forced install of a package depending on a pseudo-package
you got a strange error message. Fixed.
2003-05-06 12:44:00 +00:00
Walter Dörwald 411e5a2c29 Port test_uu.py to PyUnit. From SF patch #662807. 2003-05-06 08:57:41 +00:00
Walter Dörwald ce6829ade0 On Mac OS X pwd.getpwall() might return the tuples
('pgsql', '*', 252, []) and ('postgres', '*', 252, ['skip']),
but pwd.getgrgid(252) might return ('pgsql', '', 252, ['skip']).

Drop the test that tried to find a tuple similar to the one
returned from pwd.getgrgid() among those for the same gid returned
by pwd.getgrall(), as the only working definition of 'similar' seems
to be 'has the same gid'. This check can be done more directly.

This should fix SF bug #732783.
2003-05-05 20:37:33 +00:00
Jeremy Hylton c1b2cb9d8f SF bug 622042: Don't expect response body from HEAD request.
Bug fix candidate.
2003-05-05 16:13:58 +00:00
Skip Montanaro 581c36773a typo 2003-05-05 14:16:41 +00:00
Jeremy Hylton 0389295dcd Better fix for newurl as suggested by Jim Jewett in SF bug #730963. 2003-05-05 04:09:13 +00:00
Jeremy Hylton f6b444ede4 Add comment explaining try/except for endheaders(). 2003-05-05 01:47:13 +00:00
Jeremy Hylton 828023b6b5 Repair redirect handling and raise URLError on host-not-found.
The latest changes to the redirect handler couldn't possibly have been
tested, because they did not compute a newurl and failed with a
NameError.  The __name__ == "__main__": block has a test for
redirects.

Also, fix SF bug 723831.  A urlopen() that failed because the host was
not found raised a socket.gaierror unlike earlier versions of
urllib2.  The problem is that httplib actually establishes the
connection at a different point starting with Python 2.2.  Move the
try/except to endheaders(), which is where the connection gets
established.
2003-05-04 23:44:49 +00:00
Brett Cannon f1cfb622e8 'forget' now also deletes any proper .pyo files.
Added some docstrings.
2003-05-04 21:15:27 +00:00
Tim Peters 015dd82136 Somewhere along the way, the softspace attr of file objects became read-
only.  Repaired, and added new tests to test_file.py.
2003-05-04 04:16:52 +00:00
Martin v. Löwis 4d28d96afb Refer to __builtin__.file, not __builtins__.file 2003-05-03 09:58:26 +00:00
Martin v. Löwis e59e2bab8f Patch #711902: Cause pydoc to show data descriptor __doc__ strings. 2003-05-03 09:09:02 +00:00
Raymond Hettinger 7c2bb5bc57 * Added a substantial number of edge case and argument tests for
the itertoolsmodule.
* Taught itertools.repeat(obj, n) to treat negative repeat counts as
  zero.  This behavior matches that for sequences and prevents
  infinite loops.
2003-05-03 05:59:48 +00:00
Raymond Hettinger 27922eef35 Apply the simplified test_support boilerplate. 2003-05-03 03:38:01 +00:00
Raymond Hettinger 320a1b0454 Simplify ref count test. 2003-05-02 22:44:59 +00:00
Raymond Hettinger 8fd3f871f3 Add StopIteration tests.
Simplify test_main().
2003-05-02 22:38:07 +00:00
Jack Jansen 4f45011af2 CWI moved websites around without me knowing it, and together with
a bug in urllib2 this caused pimp to stop working. Fixed the URL to
make it work again.
2003-05-02 20:27:40 +00:00
Raymond Hettinger 341deb74e7 The previous made the stop argument optional.
It is better to be explicit and just allow stop to be None.
2003-05-02 19:44:20 +00:00
Raymond Hettinger 14ef54cd83 SF bug #730685: itertools.islice stop argument is not optional
* itertools.islice() stop argument did not perform as documented.
* beefed-up test suite
2003-05-02 19:04:37 +00:00
Raymond Hettinger 2e973c03f3 Added missing modules to __all__ check. 2003-05-02 09:36:07 +00:00
Raymond Hettinger 91bbd9a7b9 Used sets.Set() to compare unordered sequences.
Improves clarity and brevity.
2003-05-02 09:06:28 +00:00
Jack Jansen 40006e9f7a Rename funny long suite to Disk_File_Folder. 2003-05-01 22:06:15 +00:00
Walter Dörwald 21d3a32b99 Combine the functionality of test_support.run_unittest()
and test_support.run_classtests() into run_unittest()
and use it wherever possible.

Also don't use "from test.test_support import ...", but
"from test import test_support" in a few spots.

From SF patch #662807.
2003-05-01 17:45:56 +00:00
Walter Dörwald 90437c03f2 Consistently use test_support.foo everywhere.
Remove the last use of veris().

Remove now useless imports and functions.
2003-05-01 13:12:34 +00:00
Martin v. Löwis 9c5ea50c25 Patch #727805: Remove extra line ending from CGI responses. 2003-05-01 05:05:09 +00:00
Michael W. Hudson 1bc2fdd785 Delete comment my last checkin rendered obsolete.
I should also not that my last checkin did stuff that made failures give
more helpful information.
2003-04-30 08:42:19 +00:00
Brett Cannon f9addb676d Change from a threading.Condition object to a threading.Event object for
signalling when the TCP server is done.  Should hopefully solve hanging
issues for Solaris 8 & 9.  Solves the apparent hanging issue with OS X.

Closes patch #729988 .
2003-04-30 05:32:32 +00:00
Brett Cannon 13da5fa999 Make time.sleep calls go to 0 for common testing. 2003-04-30 03:03:37 +00:00
Brett Cannon e6b7033e79 Flesh out test_support docs. 2003-04-30 01:42:35 +00:00
Piers Lauder 533366beb0 improved CRLF regex for previous fix 2003-04-29 23:58:08 +00:00
Piers Lauder 47404fffff added code to canonicalise line endings in data sent via "append" - fix for bug report 723962 2003-04-29 23:40:59 +00:00
Fred Drake 75ab1462d5 Allow "@" in unquoted attribute values.
Added test that checks for characters allowed in the query part of URLs.
Backport candidate.
2003-04-29 22:12:55 +00:00
Walter Dörwald 721adf9952 Port test_richcmp.py to PyUnit. From SF patch #662807 which additional
tests and comments.
2003-04-29 21:31:19 +00:00
Walter Dörwald 1b0be2d4c6 Use the new htmlentitydefs.codepoint2name for test_xmlcharnamereplace() 2003-04-29 20:59:55 +00:00
Raymond Hettinger 1a4a9d0b0f Add doctest for example in the library reference. 2003-04-29 19:58:04 +00:00
Fred Drake 70d566be10 Extract the errno value to use from the errno module if possible. 2003-04-29 19:50:25 +00:00
Skip Montanaro c689918c94 Regain throughput lost with the _socketobject wrapper. The
throughput-sensitive methods are grabbed from the underlying _socket.socket
object.  Closes SF patch 729293.
2003-04-29 19:27:26 +00:00
Michael W. Hudson 26848a34d1 Use Tim's suggestion to fix
[ 708901 ] Lineno calculation sometimes broken

A one line patch to compile.c and a rather-more-than-one-line patch
to test_dis.  Hey ho.

Possibly a backport candidate -- tho' lnotab is less used in 2.2...
2003-04-29 17:07:36 +00:00