Walter Dörwald
8bcbe6aa7e
Don't require that a RuntimeError is raised when playing a second
...
sound while the first one is still running, as the first one
one might already have finished.
Fixes part of SF bug #763052 .
2003-06-30 11:57:52 +00:00
Raymond Hettinger
d693a81595
Fix SF 762891: "del p[key]" on proxy object raises SystemError()
2003-06-30 04:18:48 +00:00
Neal Norwitz
a9002f824b
Fix SF #754870 , SSL crash interpreter when remote side closes during connect
...
Also fix a memory leak.
2003-06-30 03:25:20 +00:00
Raymond Hettinger
0242070d04
More tests
...
* Test with infinite inputs (using take() on the output)
* Test whether GC can find and eliminate cycles.
2003-06-29 20:36:23 +00:00
Raymond Hettinger
b4e9986782
Removed invalid test.
...
Analysis by Bob Halley:
The test seems to expect that if time.daylight is true, then the
is_dst field of the tm structure will be 1 too. But this isn't
the case, since daylight is true if the timezone does DST, *not*
if DST is in effect.
2003-06-29 15:57:50 +00:00
Raymond Hettinger
2b6220d88b
SF bug #762455 : Python segfaults when sys.stdout is changed in getattr
...
* Added unittest that fails before, but not after Neil's fix to ceval.c.
2003-06-29 15:44:07 +00:00
Tim Peters
478c10554b
Whitespace normalization.
2003-06-29 05:46:54 +00:00
Raymond Hettinger
11a35f545b
SF patch #760257 : add socket.timeout exception
...
(Contributed by Bob Halley)
Add unittests for the new socket.timeout exception.
2003-06-29 04:40:22 +00:00
Raymond Hettinger
3567a876c7
Add take() to examples. Tighten the islice() example
2003-06-28 05:44:36 +00:00
Raymond Hettinger
c0fac96c29
SF patch #756996 : Bare except in ZipFile.testzip()
...
(Contributed by Steven Taschuk)
Replaces a bare except that caused all errors to be mis-reported as
archive errors.
Added a related NEWS item.
2003-06-27 22:25:03 +00:00
Raymond Hettinger
6f3eaa67e5
SF patch #761519 : Fixes for bugs 760703 and 757821
...
SF bug #760703 : SocketHandler and LogRecord don't work well together
SF bug #757821 : logging module docs
Applied Vinay Sajip's patch with a few minor fixups and a NEWS item.
Patched __init__.py - added new function
makeLogRecord (for bug report 760703).
Patched handlers.py - updated some docstrings and
deleted some old commented-out code.
Patched test_logging.py to make use of makeLogRecord.
Patched liblogging.tex to fill documentation gaps (both
760703 and bug 757821).
2003-06-27 21:43:39 +00:00
Jeremy Hylton
c4bf5edc3a
Add a trivial test of getargspec() with a method.
2003-06-27 18:43:12 +00:00
Jeremy Hylton
7ff55e6bc5
Add tests for __nonzero__() problems.
2003-06-27 17:40:16 +00:00
Raymond Hettinger
f69d9f6818
SF bug #761337 : datetime.strftime fails on trivial format string
...
The interning of short strings violates the refcnt==1 assumption for
_PyString_Resize().
A simple fix is to boost the initial value of "totalnew" by 1.
Combined with an NULL argument to PyString_FromStringAndSize(),
this assures that resulting format string is not interned.
This will remain true even if the implementation of
PyString_FromStringAndSize() changes because only the uninitialized
strings that can be interned are those of zero length.
Added a test case.
2003-06-27 08:14:17 +00:00
Raymond Hettinger
5f078ff7f0
SF bug #759889 : Pickling of Random is broken
...
* Implement __reduce__() to support pickling.
* Add a test case to prove a successful roundtrip through pickle.
2003-06-24 20:29:04 +00:00
Raymond Hettinger
8a99b50239
SF patch #736962 . Converted test_compile to unittest format.
2003-06-23 13:36:57 +00:00
Raymond Hettinger
4327521688
Added regression test for SF #757818
2003-06-20 18:41:26 +00:00
Gustavo Niemeyer
25fe0bf91a
Many new tests, based on gcov's coverage information.
...
From gcov's output (based on a locally changed _sre.c):
82.07% of 1372 source lines executed in file ./Modules/_sre.c
2003-06-20 00:25:14 +00:00
Walter Dörwald
a9da5ae07a
Use find() instead of looping over the string in expanduser().
...
From SF patch #757058 .
2003-06-19 10:21:14 +00:00
Raymond Hettinger
befa37dd05
Minor updates:
...
* Updated comment on design of imap()
* Added untraversed object in izip() structure
* Replaced the pairwise() example with a more general window() example
2003-06-18 19:25:37 +00:00
Walter Dörwald
5edd785bbb
Port test_complex.py to unittest.
...
Move the constructor tests from test_builtin to test_complex.
Add a bunch of tests (code coverage is a 94%).
From SF patch #736962 .
2003-06-18 14:26:18 +00:00
Raymond Hettinger
be9715398b
SF bug #753451 : classmethod abuse --> SystemError
...
Check the argument to classmethod for callability.
Backport candidate.
2003-06-18 01:13:41 +00:00
Walter Dörwald
e8049befdf
Use _PyEval_SliceIndex to handle list.index() calls with
...
huge start and stop arguments. Add tests.
2003-06-17 19:27:39 +00:00
Guido van Rossum
2743d87d79
Fix sloppy index() implementation:
...
- don't use min() and max()
- interpret negative start/stop argument like negative slice indices
2003-06-17 14:25:14 +00:00
Raymond Hettinger
d05abdec7b
SF #754014 : list.index() should accept optional start, end arguments
...
Also, modified UserList.index() to match and expanded the related tests.
2003-06-17 05:05:49 +00:00
Raymond Hettinger
c8106e1f1d
test_posixpath.py now uses unittest. The output file is no longer needed.
2003-06-17 04:19:59 +00:00
Neal Norwitz
98a379eda1
Add test for bug #751998 .
2003-06-16 22:51:22 +00:00
Brett Cannon
b47243ae45
Complete rewrite of tests by Walter Dorwald as unittest tests.
2003-06-16 21:54:50 +00:00
Tim Peters
f545baa0cc
Whitespace normalization.
2003-06-15 23:26:30 +00:00
Martin v. Löwis
17fb50790d
Treat empty dat/dir pairs as dumbdbm. Fixes #744687 .
2003-06-14 08:16:34 +00:00
Martin v. Löwis
ba8f5ff76c
Copy builtin functions as atomic. Fixes #746304 . Will backport to 2.2.
2003-06-14 07:10:06 +00:00
Brett Cannon
91012fe9b5
Cause calling interrupt_main in main thread raise KeyboardInterrupt instantly.
2003-06-13 23:56:32 +00:00
Brett Cannon
4e64d78bbb
dummy_thread modified to have interrupt_main and to behave appropriately when
...
called.
Added announcement in Misc/NEWS for thread.interrupt_main and mention of
dummy_thread's change.
2003-06-13 23:44:35 +00:00
Guido van Rossum
99d2c251df
SF patch 707900, fixing bug 702858, by Steven Taschuk.
...
Copying a new-style class that had a reference to itself didn't work.
(The same thing worked fine for old-style classes.)
2003-06-13 19:28:47 +00:00
Brett Cannon
43e559a155
When calling tarname with an argument (and thus not use testtar.tar) return a
...
path for the file in the temp directory for the platform.
2003-06-12 19:16:58 +00:00
Brett Cannon
455ea53d0e
Make creation of temporary file and directory more portable. Also made cleanup
...
code use proper functions to get paths.
Changed the name of tar file that is searched for to be absolute (i.e., not use
os.extsep) since filename is locked in based on name of file in CVS
(testtar.tar).
Closes bug #731403 .
2003-06-12 08:01:06 +00:00
Skip Montanaro
1546bc43fe
add a couple test cases which involve longs and floats in 'e' format.
2003-06-12 02:40:22 +00:00
Barry Warsaw
9caa0d1642
guess_all_extensions(): Return the empty list instead of None when
...
there are no matching types. Updated the docs and docstrings. Added
some unit tests.
2003-06-09 22:27:41 +00:00
Neal Norwitz
e2fdc61004
Fix SF #749831 , copy raises SystemError when getstate raises exception
2003-06-08 13:19:58 +00:00
Martin v. Löwis
56f88113b7
Patch #746801 : FreeBSD 4 expected failures, by Charles Swiger.
2003-06-07 20:01:37 +00:00
Greg Ward
8a709b3049
Factor endian-ness check out of play_sound_file(), and fix
...
test_setparameters() to use it -- don't assume AFMT_S16_NE is always
defined!
2003-06-03 00:32:44 +00:00
Raymond Hettinger
40174c358f
SF bug #733667 : kwargs handled incorrectly
...
The fast_function() inlining optimization only
applies when there are zero keyword arguments.
2003-05-31 07:04:16 +00:00
Guido van Rossum
bb1861a996
Remove debug code from weakref_segfault().
2003-05-29 14:30:49 +00:00
Guido van Rossum
aabe0b3e34
Add testcase for SF 742911.
2003-05-29 14:26:57 +00:00
Raymond Hettinger
b25a52aac0
Fix typo so that the test actually calls the tested function.
2003-05-29 07:20:29 +00:00
Raymond Hettinger
f0fa1c03a0
Test ability to handle various type of iterators.
2003-05-29 07:18:57 +00:00
Greg Ward
29a1deff3a
Test script changed.
2003-05-29 01:29:28 +00:00
Greg Ward
4f12d4652d
Renamed test_errors() to test_setparameters() and completely rewrote it
...
to test the new setparameters() interface.
Modified play_sound_file() to print the elapsed time taken to play the
test sample (to the nearest 0.1 sec).
2003-05-29 01:27:39 +00:00
Greg Ward
080c110172
Order and number of arguments to setparameters() has changed.
...
Rename 'a' (the audio device) to 'dsp' everywhere.
2003-05-29 00:23:17 +00:00
Raymond Hettinger
e8b0f0461b
* Beefed-up tests
...
* Allow tuple re-use
* Call tp_iternext directly
2003-05-28 14:05:34 +00:00