Commit graph

10672 commits

Author SHA1 Message Date
Georg Brandl
96c3f7f56b Make test_decimal work with -Qnew. 2006-03-28 08:06:35 +00:00
Tim Peters
b82cb8dcd5 Part of bug 1459808: fiddle test_input_and_raw_input()
so it passes w/ -Qnew.
2006-03-28 07:39:22 +00:00
Tim Peters
1c5bc1c9d7 Part of bug 1459808: fiddle so that this passes
with or without -Qnew.
2006-03-28 07:28:40 +00:00
Phillip J. Eby
35fd142435 Fix contextlib not copying function attributes 2006-03-28 00:07:24 +00:00
Phillip J. Eby
849974fb56 dummy_thread needs to support PEP 343 too. 2006-03-27 23:32:10 +00:00
Phillip J. Eby
02e19975d4 Patch #1459476: install PKG-INFO metadata alongside distutils-installed packages. 2006-03-27 21:55:21 +00:00
Walter Dörwald
a8da934069 Whitespace. 2006-03-27 09:02:04 +00:00
Neal Norwitz
33b730e33c Fix SF bug #1458903 with AST compiler.
def foo((x)): was getting recognized as requiring tuple unpacking
which is not correct.

Add tests for this case and the proper way to unpack a tuple of one:
	def foo((x,)):

test_inpsect was incorrect before.  I'm not sure why it was passing,
but that has been corrected with a test for both functions above.
This means the test (and therefore inspect.getargspec()) are broken in 2.4.
2006-03-27 08:58:23 +00:00
Georg Brandl
1c168d8eeb Bug #1457264: parse http://host?query correctly in urllib 2006-03-26 20:59:38 +00:00
Martin v. Löwis
04855cc100 Fix typo. 2006-03-26 16:40:47 +00:00
Martin v. Löwis
6da56f9428 Patch from Aldo Cortesi: expected skips for OpenBSD. 2006-03-26 10:02:34 +00:00
Martin v. Löwis
c667d052e5 Provide more debug output, to diagnose OpenBSD test failures. 2006-03-26 09:50:11 +00:00
Hye-Shik Chang
9f4b632212 Allow long objects as a position value of error callbacks returned. 2006-03-26 06:21:34 +00:00
Neal Norwitz
7545a6bac2 regsub is gone, nothing to ignore 2006-03-26 04:59:27 +00:00
Neal Norwitz
2c85d826d8 Try to handle sys.getfilesystemencoding() returning None.
ascii seems like the safest bet that it will exist.  I wonder if utf-8
would be a better choice?  This should get test_fileinput passing on OpenBSD.
2006-03-26 03:11:57 +00:00
Hye-Shik Chang
e2ac4abd01 Patch #1443155: Add the incremental codecs support for CJK codecs.
(reviewed by Walter Dörwald)
2006-03-26 02:34:59 +00:00
Georg Brandl
baf05b7e09 fix typo 2006-03-25 13:12:56 +00:00
Raymond Hettinger
c4e94b90a8 Don't decrement below zero. And add more tests. 2006-03-25 12:15:04 +00:00
Phillip J. Eby
ccc7bb4ef2 More extensive comment on __exit__ handling, per Guido's request. 2006-03-25 04:32:12 +00:00
Tim Peters
e33901eb2b Whitespace normalization. 2006-03-25 01:50:43 +00:00
Phillip J. Eby
6edd258608 Fix a problem with @contextmanager not detecting a broken generator
that yields after a throw().  Make @contextmanager not reraise
exceptions, but return a false value in that case instead.  Add test
cases for both behaviors.
2006-03-25 00:28:24 +00:00
Phillip J. Eby
bee0712214 Support throw() of string exceptions. 2006-03-25 00:05:50 +00:00
Raymond Hettinger
43b00da219 Revert previous change. Wasn't ready yet. 2006-03-24 23:55:32 +00:00
Raymond Hettinger
e751c86dcb Add more tests 2006-03-24 23:47:53 +00:00
Phillip J. Eby
4a26633e0e Revert r42719, because the isinstance() check wasn't redundant; formatting a
string exception was causing a TypeError.
2006-03-24 22:10:54 +00:00
Raymond Hettinger
fd3fcf0b35 SF Patch #1455676: Simplify using Queues with daemon consumer threads
Adds join() and task_done() methods to track when all enqueued tasks have
been gotten and fully processed by daemon consumer threads.
2006-03-24 20:43:29 +00:00
Nick Coghlan
c841bb6b63 run_module shouldn't hold the import lock when running a script 2006-03-24 13:05:53 +00:00
Neal Norwitz
cdb7948f97 Use absolute import. 2006-03-24 08:58:38 +00:00
Martin v. Löwis
b95caff56c Clarify cases when waitpid might not return self.pid. 2006-03-24 08:26:26 +00:00
Martin v. Löwis
478c82d30f Bug #1183780: Add Popen objects to _active only in __del__.
Cleanup terminated processes as well.
Add cmd attribute to Popen4.
2006-03-24 08:14:54 +00:00
Neal Norwitz
846d72a7d7 Exceptions should inherit from Exception now. 2006-03-24 08:02:51 +00:00
Neal Norwitz
de868c9a1b Hmmm, I don't think we wanted to test // twice and / not at all (in this section). 2006-03-24 07:30:56 +00:00
Neal Norwitz
5a822fb720 Exceptions should inherit from Exception now. 2006-03-24 07:03:44 +00:00
Martin v. Löwis
c92157ff52 Relax result test for program mode of quopri. 2006-03-23 19:14:23 +00:00
Martin v. Löwis
bd8dbab247 Preserve command name, for later printing of active
commands. If there are active commands when the tests
start, fail, printing these commands.
2006-03-23 18:18:35 +00:00
Martin v. Löwis
83be9669c8 Rewrite pipe code using subprocess, to make sure the
child process is closed when the test completes.
2006-03-23 18:16:43 +00:00
Neal Norwitz
e98ccf6690 Forward port MvL's fix in 43227:
Fix crash when a Unicode string containing an encoding declaration is
compile()d. Fixes #1115379.
2006-03-23 05:39:47 +00:00
Neal Norwitz
8142cb6f20 Damn another occurrence of using as as a keywordf 2006-03-22 07:13:30 +00:00
Tim Peters
0ae07bdb59 Whitespace normalization. 2006-03-22 03:23:21 +00:00
Tim Peters
b84de02f75 Record that test_wait[34] get skipped on native Windows. 2006-03-22 02:58:17 +00:00
Georg Brandl
bb03ac0dae Correct API design mistake from rev. 43126: make socket attributes readonly properties. 2006-03-21 18:17:25 +00:00
Tim Peters
59b96c1029 Try to repair at least one segfault on the Mac buildbot,
as diagnosed by Nick Coghlan.

test_capi.py:  A test module should never spawn a thread as
a side effect of being imported.  Because this one did, the
segfault one of its thread tests caused didn't occur until
a few tests after test_regrtest.py thought test_capi was
finished.  Repair that.  Also join() the thread spawned
at the end, so that test_capi is truly finished when
regrtest reports that it's done.

_testcapimodule.c test_thread_state():  this spawns a
couple of non-threading.py threads, passing them a PyObject*
argument, but did nothing to ensure that those threads
finished before returning.  As a result, the PyObject*
_could_ (although this was unlikely) get decref'ed out of
existence before the threads got around to using it.
Added explicit synchronization (via a Python mutex) so
that test_thread_state can reliably wait for its spawned
threads to finish.
2006-03-21 03:58:41 +00:00
Thomas Heller
cce2267cf1 Plug a leak in the ctypes test suite when tests are run repeatedly. 2006-03-20 08:11:56 +00:00
Thomas Heller
d59ca8f335 Accessing unaligned structure fields works now on all architectures.
Including unittest.
2006-03-20 07:54:01 +00:00
Anthony Baxter
46fa48ab04 whitespace n11n 2006-03-20 07:10:01 +00:00
Neal Norwitz
05a45599d7 Patch #1309579: wait3 and wait4 were added to the posix module by Chad J. Schroeder.
This was a fair amount of rework of the patch.  Refactored test_fork1 so it
could be reused by the new tests for wait3/4.  Also made them into new style
unittests (derive from unittest.TestCase).
2006-03-20 06:30:08 +00:00
Anthony Baxter
fa86907aae SF [ 1231053 ] audioop - alaw encoding/decoding added, code updated
This patch adds a-LAW encoding to audioop and replaces the old
u-LAW encoding/decoding code with the current code from sox.

Possible issues: the code from sox uses int16_t.

Code by Lars Immisch
2006-03-20 05:21:58 +00:00
Neal Norwitz
d5b0c9b87e Fix problem spotted by Coverity that occurs if tzinfo.tzname().replace()
returns a non-string when converting %Z.

Will backport.
2006-03-20 01:58:39 +00:00
Kurt B. Kaiser
70f05c5d7f Source file f.flush() after writing; trying to avoid lossage if user
kills GUI.  Report from B. Sherwood.  Backport to 2.3.4.
2006-03-19 20:40:05 +00:00
Walter Dörwald
6a7ec7c3e2 Change raise statement to PEP 8 style. 2006-03-18 16:35:17 +00:00