Commit graph

48326 commits

Author SHA1 Message Date
R David Murray
b588f8dd9f #11031: Add --testdir to specify where to find tests
Patch by Sandro Tosi.  The main purpose of this option is to allow
an alternate set of tests files to be used when running tests
of the regrtest tool itself.
2011-03-24 14:42:58 -04:00
R David Murray
03504fc2fb #11030: make --coverdir work for relative directories again. 2011-03-24 14:35:30 -04:00
Raymond Hettinger
6712a3e14f Remove test_importable(). Couldn't see how to make this reliable across all platforms. 2011-03-24 10:51:06 -07:00
Raymond Hettinger
d4652fab51 Isolate the test_source() test in test_collections 2011-03-24 09:45:43 -07:00
R David Murray
73bd0448b9 Merge #11606: improved body_encode algorithm, no longer produces overlong lines 2011-03-24 12:28:39 -04:00
R David Murray
c7d28be62f Merge #11606: improved body_encode algorithm, no longer produces overlong lines 2011-03-24 12:27:23 -04:00
R David Murray
b938c8c253 #11606: improved body_encode algorithm, no longer produces overlong lines
Algorithm and initial patch by Michael Henry.
2011-03-24 12:19:26 -04:00
Victor Stinner
f09e652a0e Merge 3.2 2011-03-24 16:39:34 +01:00
Victor Stinner
900189b414 Merge 3.1 2011-03-24 16:39:07 +01:00
Victor Stinner
29943aa120 test_multiprocessing: use assertLess() to see the timeout on error 2011-03-24 16:24:07 +01:00
Antoine Pitrou
bace3b9ac6 Add tests for the atexit hook in concurrent.futures (part of #11635) 2011-03-24 15:48:26 +01:00
Antoine Pitrou
aebac0b55a Add tests for the atexit hook in concurrent.futures (part of #11635) 2011-03-24 15:47:39 +01:00
Senthil Kumaran
ea8b024d11 issue11236 getpass.getpass to respond ctrl-c or ctrl-z 2011-03-24 22:27:01 +08:00
Senthil Kumaran
e6ead3905d issue10883 - Silence some ftp related ResourceWarnings in test_urllib2net. Patch by Nadeem Vawda 2011-03-24 11:47:29 +08:00
Senthil Kumaran
2024acd36f issue10883 - Silence some ftp related ResourceWarnings in test_urllib2net. Patch by Nadeem Vawda. 2011-03-24 11:46:19 +08:00
Raymond Hettinger
f6d3e8eaef Add tests for _source to importable and exec'able.
Move __name__ back out of the template; the responsibility
for setting __name__ lies with the caller (which knows
something about the new namespace), not with the class
definition (which doesn't know about the namespace it is
being built in).
2011-03-23 20:33:30 -07:00
Brett Cannon
5d43cff623 Remove a stale comment. 2011-03-23 18:12:24 -07:00
Brett Cannon
442c9b92d8 Make importlib compatible with __import__ by "fixing" code.co_filename
paths.

__import__ does a little trick when importing from bytecode by
back-patching the co_filename paths to point to the file location
where the code object was loaded from, *not* where the code object was
originally created. This allows co_filename to point to a valid path.
Problem is that co_filename is immutable from Python, so a private
function -- imp._fix_co_filename() -- had to be introduced in order to
get things working properly. Originally the plan was to add a file
argument to marshal.loads(), but that failed as the algorithm used by
__import__ is not fully recursive as one might expect, so to be fully
backwards-compatible the code used by __import__ needed to be exposed.

This closes issue #6811 by taking a different approach than outlined
in the issue.
2011-03-23 16:14:42 -07:00
Brett Cannon
a7468bc5c6 Have importlib use the repr of a module name in error messages.
This makes it obvious that an import failed because of some extraneous
whitespace (e.g., a newline).

This is a partial fix for issue #8754.
2011-03-23 16:06:00 -07:00
Antoine Pitrou
f3c524d535 Issue #11653: fix -W with -j in regrtest. 2011-03-23 23:05:07 +01:00
Antoine Pitrou
e44b1258ea Add NEWS entry for 9aa6097131ef 2011-03-23 23:02:31 +01:00
Antoine Pitrou
293954dd76 Issue #11653: fix -W with -j in regrtest 2011-03-23 23:01:49 +01:00
Raymond Hettinger
15d0c1d073 Minor clean-ups. 2011-03-23 14:38:39 -07:00
Raymond Hettinger
28dff61287 Add news entry for the _source attribute created by namedtuple. 2011-03-23 13:05:02 -07:00
Raymond Hettinger
41da10e62c Merge 2011-03-23 12:53:32 -07:00
Raymond Hettinger
2ebea41d31 Expose the namedtuple source with a _source attribute. 2011-03-23 12:52:23 -07:00
R David Murray
5839b9635c Merge #11590: fix quoprimime decode handling of empty strings and line endings. 2011-03-23 15:37:26 -04:00
R David Murray
523b41c4b3 Merge #11590: fix quoprimime decode handling of empty strings and line endings. 2011-03-23 15:27:04 -04:00
R David Murray
cafd79d904 #11590: fix quoprimime decode handling of empty strings and line endings. 2011-03-23 15:25:55 -04:00
Antoine Pitrou
6ab79d9d5b Allow "-j0" as an argument to regrtest, to automatically select an
appropriate number of parallel workers.
2011-03-23 20:17:45 +01:00
Antoine Pitrou
5066b03361 Fix transmitting warning options to the children when running tests in
parallel (thanks Michael for pointing this).
2011-03-23 20:10:18 +01:00
Raymond Hettinger
843a751369 Move namespace setup inside the template. 2011-03-23 11:49:56 -07:00
R David Murray
3dcf745a61 Merge #11589: add additional tests for the email quoprimime module. 2011-03-23 14:29:49 -04:00
R David Murray
3d9e973abd Merge #11589: add additional tests for the email quoprimime module. 2011-03-23 14:27:18 -04:00
R David Murray
ec1b5b88ee #11589: add additional tests for the email quoprimime module.
Patch by Michael Henry.
2011-03-23 14:19:05 -04:00
Mark Dickinson
7c9e803284 Issue #11244: Remove outdated peepholer check that was preventing the peepholer from folding -0 and -0.0. Thanks Eugene Toder for the patch. 2011-03-23 17:59:37 +00:00
Raymond Hettinger
ba7b560c1d Fix set representation in an example. 2011-03-22 22:57:49 -07:00
Raymond Hettinger
b2d0945c87 Minor named tuple clean-ups. 2011-03-22 22:36:21 -07:00
Raymond Hettinger
fef854602b Factor-out named tuple class definition template strings. 2011-03-22 21:14:41 -07:00
Éric Araujo
e84c4df786 Branch merge 2011-03-23 04:53:10 +01:00
Éric Araujo
83e7a2b7db Merge from 3.2 2011-03-23 04:52:45 +01:00
Éric Araujo
bd626d4e84 Branch merge 2011-03-23 04:52:08 +01:00
Éric Araujo
97054cf0b5 Merge from 3.2.
The fix was already present in 3.3, but I merged two small changes
recommended by Raymond while I was working on the 2.7 patch to ease
future merges.
2011-03-23 04:40:51 +01:00
Éric Araujo
bbcfc1f2d9 Merge from 3.1.
The fix was already committed to 3.2, but I merged two small changes
recommended by Raymond while I was working on the 2.7 patch to ease
future merges.
2011-03-23 03:43:22 +01:00
Antoine Pitrou
c28af1f05f Use transient_internet() consistently in test_imaplib 2011-03-23 03:11:21 +01:00
Antoine Pitrou
924cbea467 Use transient_internet() consistently in test_imaplib 2011-03-23 03:10:14 +01:00
Éric Araujo
48049911d6 Fix obscure set crashers (#8420). Backport of d56b3cafb1e6, reviewed by Raymond. 2011-03-23 02:08:07 +01:00
Éric Araujo
c09fca67e7 Do not touch sys.path when site is imported and python was started with -S.
Original patch by Carl Meyer, review by Brett Cannon, small doc editions by
yours truly.  Fixes #11591.
2011-03-23 02:06:24 +01:00
Raymond Hettinger
f59c7b2bdd Issue #10610: Document that int(), float(), and complex() accept numeric literals with the Nd property. 2011-03-22 17:34:28 -07:00
Raymond Hettinger
b1aef23316 Issue #10610: Document that int(), float(), and complex() accept numeric literals with the Nd property. 2011-03-22 17:33:53 -07:00