Benjamin Peterson
93ed82048f
revert unintended changes
2009-09-09 11:42:57 +00:00
Benjamin Peterson
8246968b12
tabbify
2009-09-09 11:40:54 +00:00
Mark Dickinson
5cfa8044ff
Issue #6857 : Fix Decimal formatting to be consistent with existing float
...
formatting: both are now right-aligned by default.
2009-09-08 20:20:19 +00:00
Mark Dickinson
968f1690d3
#Issue 6795: Fix infinite recursion in long(Decimal('nan')); change int(Decimal('nan')) to raise ValueError instead of either returning NaN or raising InvalidContext.
2009-09-07 18:04:58 +00:00
Mark Dickinson
491ea55f28
Issue #6850 : Fix bug in Decimal._parse_format_specifier for formats
...
with no type specifier.
2009-09-07 16:17:41 +00:00
Mark Dickinson
c8a7c7c3b9
Issue #6846 : bytearray.pop was returning ints in the range [-128, 128)
...
instead of [0, 256). Thanks Hagen Fürstenau for the report and fix.
2009-09-06 10:03:31 +00:00
Ronald Oussoren
2596758cb4
Fix build issues on OSX 10.6 (issue 6802)
2009-09-06 10:00:26 +00:00
Georg Brandl
ed4ca821f1
#5101 : add back tests to test_funcattrs that were lost during unittest conversion, and make some PEP8 cleanups.
2009-09-04 11:19:34 +00:00
Brett Cannon
e7e941e7f7
test_platform fails on OS X Snow Leopard because the UNIX command to get the
...
canonical version, sw_vers, leaves off trailing zeros in the version number
(e.g. 10.6 instead of 10.6.0). Test now compensates by tacking on extra zeros
for the test comparison.
Fixes issue #6806 .
2009-09-03 21:25:21 +00:00
Armin Rigo
ffd0dc1e8b
Sorry, sorry! Ignore my previous two commits. I mixed up the version
...
of python with which I tried running the crashers. They don't crash
the current HEAD.
2009-09-03 19:45:27 +00:00
Armin Rigo
f866fbb303
Does not terminate: consume all memory without responding to Ctrl-C.
...
I am not too sure why, but you can surely find out by gdb'ing a bit...
2009-09-03 19:42:03 +00:00
Armin Rigo
f416690490
Found the next crasher by thinking about this logic in PyPy.
2009-09-03 19:40:07 +00:00
Benjamin Peterson
6fcf9b50bc
remove the check that classmethod's argument is a callable
2009-09-01 22:27:57 +00:00
Amaury Forgeot d'Arc
fff896b309
#6750 : TextIOWrapped could duplicate output when several threads write to it.
...
this affect text files opened with io.open(), and the print() function of py3k
2009-08-29 18:14:40 +00:00
Lars Gustäbel
f7cda5287d
Issue #6054 : Do not normalize stored pathnames.
...
No longer use tarfile.normpath() on pathnames. Store pathnames
unchanged, i.e. do not remove "./", "../" and "//" occurrences.
However, still convert absolute to relative paths.
2009-08-28 19:23:44 +00:00
Mark Dickinson
7a7739d75e
Issue #6794 : Fix handling of NaNs in Decimal.compare_total and
...
Decimal.compare_total_mag.
2009-08-28 13:25:02 +00:00
Kristján Valur Jónsson
429677ec38
Issue 6654
...
Allow the XML-RPC server to use the HTTP request path when dispatching. Added a MultiPathXMLRPCServer class that uses the feature, plus unit tests.
2009-08-27 23:13:18 +00:00
Kristján Valur Jónsson
e2a77980b6
issue 6275
...
Add an "exc_value" attribute to the _AssertRaisesContext context manager in the unittest package. This allows further tests on the exception that was raised after the context manager exits.
2009-08-27 22:20:21 +00:00
Tarek Ziadé
764fc235a6
#6693 : New functions in site.py to get user/global site packages paths.
2009-08-20 21:23:13 +00:00
Frank Wierzbicki
df756775f5
Add test of file.write(array) extracted from Jython.
2009-08-16 20:22:51 +00:00
Gregory P. Smith
b98d6b2cbc
Issue 6665: Fix fnmatch to properly match filenames with newlines in them.
2009-08-16 18:52:58 +00:00
Benjamin Peterson
c0ba828857
better col_offsets for "for" statements with tuple unpacking #6704
...
Patch from Frank Wierzbicki.
2009-08-15 22:59:21 +00:00
Benjamin Peterson
4c6e8088f5
#6707 fix a crash with dir() on an uninitialized module
2009-08-15 13:16:38 +00:00
Brett Cannon
764465f315
Expat could crash if given the wrong kind of input by never stopping its
...
tokenizing step.
Thanks to Ivan Krstić for the patch.
2009-08-13 19:27:12 +00:00
Gregory P. Smith
c4ad0345cf
Fix issue1628205: Socket file objects returned by socket.socket.makefile() now
...
properly handles EINTR within the read, readline, write & flush methods.
The socket.sendall() method now properly handles interrupted system calls.
2009-08-13 18:54:50 +00:00
Antoine Pitrou
20e1f932fa
Issue #6629 : Fix a data corruption issue in the new `io` package, which could
...
occur when writing to a BufferedRandom object (e.g. a file opened in "rb+" or
"wb+" mode) after having buffered a certain amount of data for reading. This
bug was not present in the pure Python implementation.
Yes, this is a serious issue.
2009-08-06 20:18:29 +00:00
Raymond Hettinger
8fdab95260
Issue 6637: defaultdict.copy() failed with an empty factory.
2009-08-04 19:08:05 +00:00
Frank Wierzbicki
6c0f337904
Adding tests derived from the Jython project. These are primarily tests of
...
'single' statements with partial sentences (so they test things like "try:" in
interactive mode). Others tests hit areas that previously failed in Jython. A
couple still fail in Jython, mainly due to the difficulty of parsing partial
sentences (but should be fixed by Jython 2.6).
2009-08-02 20:37:48 +00:00
Mark Dickinson
4326ad8f72
Issue #6595 : Allow Decimal constructor to accept non-European decimal
...
digits, as recommended by the specification. (Backport of r74279 from
py3k.)
2009-08-02 10:59:36 +00:00
Amaury Forgeot d'Arc
3e5b027a64
#6511 : ZipFile will now raise BadZipfile when opening an empty or tiny file,
...
like it does for larger invalid files.
2009-07-28 22:15:30 +00:00
Amaury Forgeot d'Arc
e55df1fa2a
"Fix" for the refleak report: the ABC classes are now in the _pyio module
2009-07-28 20:47:55 +00:00
Mark Dickinson
fe67bd9168
Issue #6561 : '\d' regular expression should not match characters of
...
category [No]; only those of category [Nd]. (Backport of r74237
from py3k.)
2009-07-28 20:35:03 +00:00
Raymond Hettinger
c2b9e1a134
Issue 6573: Fix set.union() for cases where self is in the argument chain.
2009-07-27 20:32:04 +00:00
Amaury Forgeot d'Arc
74b3016783
#6553 : crash in cPickle.load(), when given a StringIO with incomplete data.
...
Will backport to 2.6, 3.x already fixed a similar issue with issue4298.
2009-07-23 19:26:02 +00:00
R. David Murray
46ca2f25eb
Backport of fix for issue 6542: make sure
...
test_os.TestInvalidFD.test_closerange does not close any
valid file descriptors.
2009-07-22 17:22:58 +00:00
Georg Brandl
ec812caf5d
Issue #6540 : Fixed crash for bytearray.translate() with invalid parameters.
2009-07-22 11:57:15 +00:00
Benjamin Peterson
4879c907ce
the Slice in x[::] has to have step as None to help the interpreter
2009-07-20 20:28:08 +00:00
Kristján Valur Jónsson
6d755900f6
http://bugs.python.org/issue6499
...
zlib/gzip may not be present for all builds. Make xmlrpclib gracefully not supporg gzip encoding in this case
2009-07-19 22:14:00 +00:00
Benjamin Peterson
d7b0eebcae
split unittest.py into a package
2009-07-19 20:18:21 +00:00
Senthil Kumaran
5fee460bfa
Fix for issue5102, timeout value propages between redirects, proxy, digest and
...
auth handlers. Fixed tests to reflect the same.
2009-07-19 02:43:43 +00:00
Mark Dickinson
88a0a2e47f
Issue #6431 : Fix Fraction comparisons with unknown types, and with
...
float infinities and nans. Backport of r74078 from py3k.
2009-07-18 15:18:18 +00:00
Hirokazu Yamamoto
e78e5d2e51
Issue #6415 : Fixed warnings.warn sagfault on bad formatted string.
2009-07-17 06:20:46 +00:00
Jesse Noller
7530e47948
Issue 6433: multiprocessing.pool.map hangs on empty list
2009-07-16 14:23:04 +00:00
Georg Brandl
d77faaf48f
#5910 : fix kqueue for calls with more than one event.
2009-07-16 07:18:07 +00:00
Ezio Melotti
d5a23e322f
methods' names pep8ification
2009-07-15 17:07:04 +00:00
Michael Foord
91dcd93beb
Move TestRunner initialisation into unittest.TestProgram.runTests. Fixes issue 6418.
2009-07-14 17:58:12 +00:00
Kristján Valur Jónsson
0369ba2a4a
http://bugs.python.org/issue6267
...
Add more tests for the xlmrpc.ServerProxy
2009-07-12 22:42:08 +00:00
Benjamin Peterson
9bd39c119e
put downloaded test support files in Lib/test/data instead of the cwd
2009-07-11 22:15:13 +00:00
Amaury Forgeot d'Arc
74b8d333b7
#2622 Import errors in email.message, from a py2app standalone application.
...
Patch by Mads Kiilerich, Reviewed by Barry Warsaw.
2009-07-11 14:33:51 +00:00
Amaury Forgeot d'Arc
9175742ef0
Add basic tests for the return value of os.popen().close().
...
According to #6358 , python 3.0 has a different implementation that behaves differently.
2009-07-11 09:09:59 +00:00
Kristján Valur Jónsson
ef6007c1ae
http://bugs.python.org/issue6460
...
Need to be careful with thread switching when testing the xmlrpc server. The server thread may not have updated stats when the client thread tests them.
2009-07-11 08:44:43 +00:00
Ezio Melotti
6cbfc12ccd
more cleanups and if zlib -> skipUnless(zlib)
2009-07-10 20:25:56 +00:00
Amaury Forgeot d'Arc
ce32eb7406
#6416 : Fix compilation of the select module on Windows, as well as test_subprocess:
...
PIPE_BUF is not defined on Windows, and probably has no meaning there.
Anyway the subprocess module uses another way to perform non-blocking reads (with a thread)
2009-07-09 22:37:22 +00:00
R. David Murray
b0c828ae4a
Try to fix Solaris buildbot rmtree failure in test_getcwd_long_pathnames
...
cleanup. If this fix works, it means that Solaris is unique among
our platforms in what happens when shutil.rmtree is called on the
current working directory (ie: it doesn't work on Solaris, but
it does everywhere else).
2009-07-09 18:41:03 +00:00
R. David Murray
6fcf7cae5c
Temporarily ignore rmtree errors in test_getcwd_long_pathnames to see
...
if the test gives useful failure info on Solaris buildbot.
2009-07-09 16:17:30 +00:00
R. David Murray
573399a2f6
Curdir needs to be in the path for the test to work on all buildbots.
...
(I copied this from another import test, but currently this will fail if
TESTFN ends up in /tmp...see issue 2609).
2009-07-09 15:35:33 +00:00
R. David Murray
fbf2cc4d74
Specify umask in execute bit test to get consistent results
...
and make sure we test resetting all three execute bits.
2009-07-09 13:55:44 +00:00
R. David Murray
00e1f63c6e
Make test work with -O.
2009-07-09 02:06:17 +00:00
R. David Murray
8a624a9eb0
Conditionalize test cleanup code to eliminate traceback, which will
...
hopefully reveal the real problem.
2009-07-09 01:43:41 +00:00
Mark Dickinson
5fd3af24a2
Issue #1523 : Remove deprecated overflow masking in struct module, and
...
make sure that out-of-range values consistently raise struct.error.
2009-07-07 15:08:28 +00:00
Mark Dickinson
bb3895cfc6
Expand test coverage for struct.pack with native integer packing;
...
reorganize the test_struct module to remove duplicated code and tests.
2009-07-07 14:15:45 +00:00
Mark Dickinson
ca6b5f36f4
Add skipping to struct test that only applies when overflow masking is in effect
2009-07-07 11:08:23 +00:00
R. David Murray
23a736a4f0
Issue 6070: when creating a compiled file, after copying the mode bits, on
...
posix zap the execute bit in case it was set on the .py file, since the
compiled files are not directly executable on posix. Patch by Marco N.
2009-07-07 01:06:13 +00:00
Mark Dickinson
463dc4bf26
Issues #1530559 , #1741130 : Fix various inconsistencies in struct.pack
...
integer packing, and reenable some previously broken tests.
2009-07-05 10:01:24 +00:00
Alexandre Vassalotti
5b1abb7bb0
Backport test cases added in r73852.
2009-07-05 06:33:41 +00:00
Alexandre Vassalotti
16a0247393
Fix bad variable name in r73846.
2009-07-05 04:25:46 +00:00
Alexandre Vassalotti
0fe799151f
Issue 2370: Add Python 3 warnings for the removal of operator.isCallable and
...
operator.sequenceIncludes.
Patch contributed by Jeff Balogh (and updated slightly by me).
2009-07-05 04:22:40 +00:00
Ezio Melotti
e7a0cc2aa8
if zlib -> skipUnless(zlib) and minor cleanups
2009-07-04 14:58:27 +00:00
Gregory P. Smith
dd7ca24eb5
Use select.poll() in subprocess, when available, rather than select() so that
...
it does not fail when file descriptors are large. Fixes issue3392.
Patch largely contributed by Frank Chu (fpmc) with some improvements by me.
See http://bugs.python.org/issue3392 .
Candidate for backporting to release26-maint as it is a bug fix and changes no
public API.
2009-07-04 01:49:29 +00:00
Benjamin Peterson
50a2252851
condense with assertRaises
2009-07-02 22:56:16 +00:00
Benjamin Peterson
d3243d8db8
test that compile() accepts the future flag
2009-07-02 21:38:36 +00:00
Benjamin Peterson
753d16234f
when print() gets unicode arguments, sep and end should be unicode by default #4618
2009-07-02 18:16:45 +00:00
Benjamin Peterson
1bf4765369
only order comparisons are removed in py3k #6119
2009-07-02 17:06:17 +00:00
Benjamin Peterson
0c6de43dd9
remove this test; a module level warning is enough
2009-07-02 16:51:56 +00:00
Benjamin Peterson
4d3f18f2ed
fix a few cases where automated fail -> assert translation messed up
...
Thanks Joe Amenta
2009-07-01 00:36:41 +00:00
Benjamin Peterson
6b0032f2c3
use assert* methods in test_unittest
2009-06-30 23:30:12 +00:00
Benjamin Peterson
5c8da86f3a
convert usage of fail* to assert*
2009-06-30 22:57:08 +00:00
Jesse Noller
1b90efbdc5
Resolves issues 5155, 5313, 5331 - bad file descriptor error with processes in processes
2009-06-30 17:11:52 +00:00
Antoine Pitrou
79c3bd80ed
Backport fix for buglet from py3k
2009-06-29 14:14:56 +00:00
Kristján Valur Jónsson
e007860b8b
http://bugs.python.org/issue6267
...
Cumulative patch to http and xmlrpc
2009-06-28 21:04:17 +00:00
Benjamin Peterson
552e7a7e2f
return locals and cells in get_locals() not bound globals, though
2009-06-28 19:27:55 +00:00
Amaury Forgeot d'Arc
595f7a5bf9
#2016 Fix a crash in function call when the **kwargs dictionary is mutated
...
during the function call setup.
This even gives a slight speedup, probably because tuple allocation
is faster than PyMem_NEW.
2009-06-25 22:29:29 +00:00
Amaury Forgeot d'Arc
14fc673d4f
Remove the ipaddr module per discussion on python-dev
2009-06-23 21:09:09 +00:00
Raymond Hettinger
62641e9534
Issue 6329: Fix iteration for memoryviews.
2009-06-23 20:59:43 +00:00
R. David Murray
ef087da9e7
Fix issue 5230 by having pydoc's safeimport check to see if the import
...
error was thrown from itself in order to decide if the module can't be
found. Thanks to Lucas Prado Melo for collaborating on the fix and tests.
2009-06-23 18:02:46 +00:00
Guilherme Polo
7f146ab0ca
Issue #5450 : Moved tests involving loading tk from Lib/test/test_tcl to
...
Lib/lib-tk/test/test_tkinter/test_loadtk in order to follow the behaviour of
test_ttkguionly.
2009-06-21 17:22:50 +00:00
Benjamin Peterson
dae5db2805
use closures
2009-06-19 22:21:12 +00:00
Benjamin Peterson
5fa09e3eb5
show that this one isn't used
2009-06-19 22:16:28 +00:00
Benjamin Peterson
9c5e4115ab
add missing assertion #6313
2009-06-19 22:09:17 +00:00
Benjamin Peterson
f1cccaa6b2
remove duplicate test
2009-06-19 22:07:47 +00:00
Georg Brandl
c29863e3a6
#6276 : Remove usage of nested() in favor of new with statement with multiple managers.
2009-06-18 22:24:26 +00:00
Hirokazu Yamamoto
cdcd4bff12
Issue #6215 : Fixed to use self.open() instead of open() or io.open().
2009-06-17 07:05:33 +00:00
Mark Dickinson
5d730177a9
Acknowledge the role of the MPFR library in creating cmath_testcases.txt
2009-06-16 20:31:12 +00:00
Benjamin Peterson
08a0bbc846
don't mask encoding errors when decoding a string #6289
2009-06-16 00:29:31 +00:00
Amaury Forgeot d'Arc
f81ff989d6
#6227 : Because of a wrong indentation, the test was not testing what it should.
...
Ensure that the snippet in doctest_aliases actually contains aliases.
2009-06-14 21:20:40 +00:00
Benjamin Peterson
a72be3b325
when no module is given in a 'from' relative import, make ImportFrom.module NULL
2009-06-13 20:23:33 +00:00
Benjamin Peterson
52c4bec76b
give a better error message when deleting ()
2009-06-13 17:08:53 +00:00
Benjamin Peterson
d1f5a59edb
allow importing from a module named None if it has an 'as' clause
2009-06-13 13:06:21 +00:00
Benjamin Peterson
565e1b6bb7
prevent import statements from assigning to None
2009-06-13 03:46:30 +00:00
Benjamin Peterson
4afbba3d34
keep the slice.step field as NULL if no step expression is given
2009-06-13 01:40:00 +00:00