R David Murray [Mon, 9 Apr 2012 13:37:52 +0000 (09:37 -0400)]
Rename test_ file that is really a support file to remove test_ prefix.
I thought I had run the full test suite before the last checkin, but
obviously I didn't. test_multibytecodec_support.py isn't really a test file,
it is a support file that contains a base test class. Rename it to
multibytecodec_support so that regrtest test discovery doesn't think it is a
test file that should be run.
R David Murray [Mon, 9 Apr 2012 12:55:42 +0000 (08:55 -0400)]
#14533: if a test has no test_main, use loadTestsFromModule.
This moves us further in the direction of using normal unittest facilities
instead of specialized regrtest ones. Any test module that can be correctly
run currently using 'python unittest -m test.test_xxx' can now be converted to
use normal unittest test loading by simply deleting its test_main, thus no
longer requiring manual maintenance of the list of tests to run. (Not all
tests can be converted that easily, since test_main sometimes does some
additional things (such as reap_children or reap_threads). In those cases the
extra code may be moved to setUpModule/tearDownModule methods, or perhaps the
same ends can be achieved in a different way, such as moving the decorators to
the test classes that need them, etc.)
I don't advocate going through and making this change wholesale, but any time
a list of tests in test_main would otherwise need to be updated, consideration
should instead be given to deleting test_main.
R David Murray [Mon, 9 Apr 2012 02:36:07 +0000 (22:36 -0400)]
#12537: in mailbox avoid depending on knowledge of email package internals
Previously mailbox was copying a list of attributes from one message object to
another in order to "copy the message data". This means that any time new
attributes were added to email.message.Message, mailbox broke. Now instead it
copies all attributes from the source object to the target object, skipping
any mailbox-object-specific attributes to produce the same clean initial
state it was previously getting by copying only the "known" attributes.
David Lam assisted in the development of this patch.
Antoine Pitrou [Sun, 8 Apr 2012 22:49:17 +0000 (00:49 +0200)]
Issue #7978: socketserver now restarts the select() call when EINTR is returned.
This avoids crashing the server loop when a signal is received.
Patch by Jerzy Kozera.
Antoine Pitrou [Sun, 8 Apr 2012 22:47:24 +0000 (00:47 +0200)]
Issue #7978: socketserver now restarts the select() call when EINTR is returned.
This avoids crashing the server loop when a signal is received.
Patch by Jerzy Kozera.
Stefan Krah [Sat, 7 Apr 2012 13:57:59 +0000 (15:57 +0200)]
1) Fix comment.
2) Assert that the source operand is not special. Prevent resulting assert
failure (harmless) by initializing flags before calling mpd_qshiftr_inplace.
3) Save a couple of instructions (mpd_zerocoeff already sets digits and len).
Reorder initialization to match the order in the mpd_t struct.
Stefan Krah [Thu, 5 Apr 2012 13:46:19 +0000 (15:46 +0200)]
Allow printing a leading '-' and the maximum number of exponent digits
rather than raising RuntimeError (allocated space is sufficient for the
additional character).
Stefan Krah [Thu, 5 Apr 2012 13:21:58 +0000 (15:21 +0200)]
Raise InvalidOperation if exponents of zeros are clamped during exact
conversion in the Decimal constructor. Exact here refers to the
representation and not to the value (clamping does not change the value).
R David Murray [Thu, 5 Apr 2012 01:29:03 +0000 (21:29 -0400)]
Merge #14490, #14491: add 'sundry'-style import tests for Tools/scripts.
This patch changes a few of the scripts to have __name__=='__main__'
clauses so that they are importable without running. Also fixes the
syntax errors revealed by the tests.
R David Murray [Thu, 5 Apr 2012 01:28:14 +0000 (21:28 -0400)]
#14490, #14491: add 'sundry'-style import tests for Tools/scripts.
This patch changes a few of the scripts to have __name__=='__main__'
clauses so that they are importable without running. Also fixes the
syntax errors revealed by the tests.
Antoine Pitrou [Tue, 3 Apr 2012 18:13:45 +0000 (20:13 +0200)]
Issue #14482: Raise a ValueError, not a NameError, when trying to create
a multiprocessing Client or Listener with an AF_UNIX type address under
Windows. Patch by Popa Claudiu.
Antoine Pitrou [Tue, 3 Apr 2012 18:12:23 +0000 (20:12 +0200)]
Issue #14482: Raise a ValueError, not a NameError, when trying to create
a multiprocessing Client or Listener with an AF_UNIX type address under
Windows. Patch by Popa Claudiu.
Stefan Krah [Mon, 2 Apr 2012 17:10:20 +0000 (19:10 +0200)]
Testing the implicit initialization of the thread local context on first
access fails (expectedly) if other modules have already used decimal. The
only option is to remove the test.