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.
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.
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.
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.