Vinay Sajip
bb99058898
Socket handler closed prior to end of test.
2004-02-20 13:19:16 +00:00
Neal Norwitz
63dfece675
Get test to work when run from regrtest (add test_main), remove all CRs (^M)s
2004-02-19 02:37:29 +00:00
David Ascher
e2b4b32025
Implementation of patch 869468
...
Allow the user to create Tkinter.Tcl objects which are
just like Tkinter.Tk objects except that they do not
initialize Tk. This is useful in circumstances where the
script is being run on machines that do not have an X
server running -- in those cases, Tk initialization fails,
even if no window is ever created.
Includes documentation change and tests.
Tested on Linux, Solaris and Windows.
Reviewed by Martin von Loewis.
2004-02-18 05:59:53 +00:00
Fred Drake
55cf434735
further testing indicates that the simplified version of the test
...
(re-using an existing test object class) no longer triggered the
original segfault when the fix was backed out; restoring the local
test object class to make the test effective
the assignment of the ref created at the end does not affect the test,
since the segfault happended before weakref.ref() returned; removing
the assignment
2004-02-13 19:21:57 +00:00
Fred Drake
61dafcb6ca
use existing test object instead of defining a new class
2004-02-12 19:30:17 +00:00
Walter Dörwald
70a6b49821
Replace backticks with repr() or "%r"
...
From SF patch #852334 .
2004-02-12 17:35:32 +00:00
Skip Montanaro
05eb40128e
Fix indentation error in testGetServByName and rewrite loop to avoid clumsy
...
sentinel variable
2004-02-10 15:51:15 +00:00
Raymond Hettinger
029dba5a40
Make reversed() transparent with respect to length.
2004-02-10 09:33:39 +00:00
Raymond Hettinger
5cab2e3a88
Give itertools.repeat() a length method.
2004-02-10 09:25:40 +00:00
Raymond Hettinger
06353f76be
Let reversed() work with itself.
2004-02-08 10:49:42 +00:00
Raymond Hettinger
ee33b27ef0
Make deque.rotate() smarter. Beef-up related tests.
2004-02-08 04:05:26 +00:00
Barry Warsaw
3b6d025d9b
Patch #868499 , adds -T option for code coverage. The implementation is a
...
fairly simpleminded adaptation of Zope3's test.py -T flag.
I also changed some booleans to use True/False where appropriate.
2004-02-07 22:43:03 +00:00
Raymond Hettinger
5c5eb86347
* Incorporate Skip's suggestions for documentation (explain the word deque
...
comes from and show the differences from lists).
* Add a rotate() method.
2004-02-07 21:13:00 +00:00
Raymond Hettinger
c058fd14a9
* Fix ref counting in extend() and extendleft().
...
* Let deques support reversed().
2004-02-07 02:45:22 +00:00
Raymond Hettinger
3ba85c2e8a
Have deques support high volume loads.
2004-02-06 19:04:56 +00:00
Walter Dörwald
7dcf9f89d3
Fix test failure message (from SF patch #885008 )
2004-02-06 18:30:31 +00:00
Walter Dörwald
cd736e71a3
Fix reallocation bug in unicode.translate(): The code was comparing
...
characters instead of character pointers to determine space requirements.
2004-02-05 17:36:00 +00:00
Fred Drake
bc875f5a36
Allocating a new weakref object can cause existing weakref objects for
...
the same object to be collected by the cyclic GC support if they are
only referenced by a cycle. If the weakref being collected was one of
the weakrefs without callbacks, some local variables for the
constructor became invalid and have to be re-computed.
The test caused a segfault under a debug build without the fix applied.
2004-02-04 23:14:14 +00:00
Fred Drake
ea2adc9c80
- add tests that exercise fixes for the PyWeakref_NewRef() and
...
PyWeakref_NewProxy() constructors from the C API
- elaborate the getweakrefcount() and getweakrefs() tests slightly
2004-02-03 19:56:46 +00:00
Hye-Shik Chang
ff83c2bacc
Fix input() builtin function to respect compiler flags.
...
(SF patch 876178, patch by mwh, unittest by perky)
2004-02-02 13:39:01 +00:00
Raymond Hettinger
756b3f3c15
* Move collections.deque() in from the sandbox
...
* Add unittests, newsitem, and whatsnew
* Apply to Queue.py mutex.py threading.py pydoc.py and shlex.py
* Docs are forthcoming
2004-01-29 06:37:52 +00:00
Raymond Hettinger
734fb5724f
Add a Guido inspired example for groupby().
2004-01-20 20:04:40 +00:00
Hye-Shik Chang
a5e719e081
Test not the standard utf-8 codec but gb18030 which is the most complex
...
codec in multibytecodec consumers.
2004-01-20 09:11:48 +00:00
Tim Peters
1301892715
For whatever reason, these files had \r\r\n line endings on Windows,
...
meaning they must have been checked in to CVS from a Linuxish box with
Windowish \r\n line endings to begin with.
2004-01-18 21:03:23 +00:00
Tim Peters
58eb11cf62
Whitespace normalization.
2004-01-18 20:29:55 +00:00
Hye-Shik Chang
3e2a306920
Add CJK codecs support as discussed on python-dev. (SF #873597 )
...
Several style fixes are suggested by Martin v. Loewis and
Marc-Andre Lemburg. Thanks!
2004-01-17 14:29:29 +00:00
Raymond Hettinger
0c4102760c
SF Patch #864863 : Bisect C implementation
...
(Contributed by Dmitry Vasiliev.)
2004-01-05 10:13:35 +00:00
Hye-Shik Chang
75c00efcc7
[SF #866875 ] Add a specialized routine for one character
...
separaters on str.split() and str.rsplit().
2004-01-05 00:29:51 +00:00
Raymond Hettinger
d73ef06cd3
Exercise sorted() where possible
2004-01-04 11:14:51 +00:00
Barry Warsaw
4f019d3b47
More complete code coverage, including testing the new RFC 3548 support.
2004-01-04 01:13:02 +00:00
Alex Martelli
b993b067d2
The script now takes an optional command-line argument to specify how many
...
loops to run (default remains 50,000 if no argument is specified).
2004-01-02 17:11:54 +00:00
Raymond Hettinger
6e70accaff
Strengthen the test for hash effectiveness
2003-12-31 02:01:33 +00:00
Andrew M. Kuchling
b386f6a509
As part of fixing bug #829532 , add a test case that exercises os.makedirs
2003-12-23 16:36:11 +00:00
Hye-Shik Chang
7fc4cf57b8
Fix unicode.rsplit()'s bug that ignores separater on the end of string when
...
using specialized splitter for 1 char sep.
2003-12-23 09:10:16 +00:00
Hye-Shik Chang
8d2e08dcdf
Enable some unittests on FreeBSD.
...
test__locale: add typical POSIX-style full locale names.
test_locale: use en_US.US-ASCII on FreeBSD.
2003-12-19 01:16:03 +00:00
Jeremy Hylton
e708fbd286
Remove methods that are no longer called by urllib2.
2003-12-17 20:47:28 +00:00
Raymond Hettinger
64958a15d7
Guido grants a Christmas wish:
...
sorted() becomes a regular function instead of a classmethod.
2003-12-17 20:43:33 +00:00
Jeremy Hylton
df38ea9c29
Add methods to MockHTTPClass for modern httplib interface.
...
Replace lots of assert_(x == y) with assertEqual(x, y).
2003-12-17 20:42:38 +00:00
Hye-Shik Chang
3ae811b57d
Add rsplit method for str and unicode builtin types.
...
SF feature request #801847 .
Original patch is written by Sean Reifschneider.
2003-12-15 18:49:53 +00:00
Jeremy Hylton
c1be59f40a
SF patch 852995: add processors feature to urllib2
...
John J. Lee writes: "the patch makes it possible to implement
functionality like HTTP cookie handling, Refresh handling,
etc. etc. using handler objects. At the moment urllib2's handler
objects aren't quite up to the job, which results in a lot of
cut-n-paste and subclassing. I believe the changes are
backwards-compatible, with the exception of people who've
reimplemented build_opener()'s functionality -- those people would
need to call opener.add_handler(HTTPErrorProcessor).
The main change is allowing handlers to implement
methods like:
http_request(request)
http_response(request, response)
In addition to the usual
http_open(request)
http_error{_*}(...)
"
Note that the change isn't well documented at least in part because
handlers aren't well documented at all. Need to fix this.
Add a bunch of new tests. It appears that none of these tests
actually use the network, so they don't need to be guarded by a
resource flag.
2003-12-14 05:27:34 +00:00
Neal Norwitz
328f338196
SF #736962 , port test_future to unittest, add a bit more coverage, by Walter Dörwald
2003-12-13 22:43:34 +00:00
Walter Dörwald
b167b04a2e
Add tests to test_weakref.py to bring code coverage in _weakref.c up to 100%.
...
Port test_md5.py to PyUnit.
(Written by Neal Norwitz; from SF patch 736962)
(Backport candidate)
2003-12-11 12:34:05 +00:00
Walter Dörwald
1dde95dffa
Move list and tuple tests from test_types.py to their own scripts:
...
test_tuple.py and test_list.py. Common tests for tuple, list and UserList
are shared (in seq_tests.py and list_tests.py). Port tests to PyUnit.
(From SF patch #736962 )
2003-12-08 11:38:45 +00:00
Raymond Hettinger
d25c1c6351
Implement itertools.groupby()
...
Original idea by Guido van Rossum.
Idea for skipable inner iterators by Raymond Hettinger.
Idea for argument order and identity function default by Alex Martelli.
Implementation by Hye-Shik Chang (with tweaks by Raymond Hettinger).
2003-12-06 16:23:06 +00:00
Michael W. Hudson
9da1efb5ae
Remove extra copy of test_key_with_exception that somehow appeared
...
during a CVS merge.
2003-12-04 11:41:24 +00:00
Michael W. Hudson
1df0f654e8
Fixes and tests for various "holding pointers when arbitrary Python code
...
can run" bugs as discussed in
[ 848856 ] couple of new list.sort bugs
2003-12-04 11:25:46 +00:00
Tim Peters
c6c5ece7e2
Typo repair; added some comments and horizontal whitespace.
2003-12-04 05:39:43 +00:00
Mark Hammond
2e8624c21a
Fix test_unicode_file errors on platforms without Unicode file support,
...
by setting TESTFN_UNICODE_UNENCODEABLE on these platforms.
test_unicode_file only attempts to use the name for testing if not None.
2003-12-03 22:16:47 +00:00
Walter Dörwald
c8de4585a6
Add parameters indent, width and depth to pprint.pprint() and pprint.pformat()
...
and pass them along to the PrettyPrinter constructor.
2003-12-03 20:26:05 +00:00
Walter Dörwald
7a7ede54d4
Patch #750542 : pprint now will pretty print subclasses of list, tuple
...
and dict too, as long as they don't overwrite __repr__().
2003-12-03 20:15:28 +00:00