| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Added checks for integer overflows, contributed by Google. Some are
only available if asserts are left in the code, in cases where they
can't be triggered from Python code.
|
| |
|
|
|
|
| |
This might help fix some of the failures on Windows box(es). It doesn't hurt
either way and ensure the tests are a little more self contained (ie have
less assumptions).
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Specialcase extended slices that amount to a shallow copy the same way as
is done for simple slices, in the tuple, string and unicode case.
- Specialcase step-1 extended slices to optimize the common case for all
involved types.
- For lists, allow extended slice assignment of differing lengths as long
as the step is 1. (Previously, 'l[:2:1] = []' failed even though
'l[:2] = []' and 'l[:2:None] = []' do not.)
- Implement extended slicing for buffer, array, structseq, mmap and
UserString.UserString.
- Implement slice-object support (but not non-step-1 slice assignment) for
UserString.MutableString.
- Add tests for all new functionality.
|
| |
|
|
|
|
| |
Two (test_array and test_descr) were bug IMO; the third (copy_reg)
is a work-around which recognizes that object.__init__() doesn't do
anything.
|
| | |
|
| |
|
|
| |
types.
|
| |
|
|
|
| |
array.__deepcopy__() needs to take an argument, even if it doesn't actually
use it. Will backport to 2.5 and 2.4 (if applicable.)
|
| |
|
|
|
| |
due to that id() may return a long on a 32-bit box now. On a box that
assigns addresses "with the sign bit set", id() always returns a long now.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Made the constructor accept general iterables.
|
| | |
|
| |
|
|
|
|
|
| |
array.extend() now accepts iterable arguments implements as a series
of appends. Besides being a user convenience and matching the behavior
for lists, this the saves memory and cycles that would be used to
create a temporary array object.
|
| |
|
|
| |
Added support for the copy module.
|
| | |
|
| | |
|
| |
|
|
|
| |
* Move new test_byteswap into FPTest.
* Remove extra lines at end of file.
|
| |
|
|
|
|
|
|
|
|
| |
patterns as floats/doubles results in floating point exceptions.
Fix this by implementing a separate test_byteswap() for the floating
point tests. This new test compares the tostring() values of both arrays
instead of the arrays themselves.
Discovered by Neal Norwitz.
|
| |
|
|
|
| |
being relative to the end of the array, just like list.insert() does.
This closes SF bug #739313.
|
| | |
|
| |
|
|
|
|
| |
(code coverage for Modules/arraymodule.c is at 91%)
From SF patch #736962.
|
| | |
|
| |
|
|
|
|
| |
[ 587875 ] crash on deleting extended slice
The array code got simpler, always a good thing!
|
| |
|
|
|
|
|
|
|
|
|
| |
imports e.g. test_support must do so using an absolute package name
such as "import test.test_support" or "from test import test_support".
This also updates the README in Lib/test, and gets rid of the
duplicate data dirctory in Lib/test/data (replaced by
Lib/email/test/data).
Now Tim and Jack can have at it. :)
|
| |
|
|
|
|
|
|
|
| |
http://mail.python.org/pipermail/python-dev/2002-June/025461.html
with test cases.
Also includes extended slice support for arrays, which I thought I'd
already checked in but obviously not.
|
| |
|
|
|
|
|
| |
[ 555382 ] test_array v.s. --disable-unicode
+ MvL's suggestions. Just the 32 failing tests in --disable-unicode builds
now...
|
| |
|
|
|
|
| |
- make array.array a type
- add Py_UNICODE arrays
- support +=, *=
|
| |
|
|
| |
'verify' iff it's used by a test module...
|
| |
|
|
|
|
|
| |
and replaces them with a new API verify(). As a result the regression
suite will also perform its tests in optimization mode.
Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
reverse() didn't work at all due to bad arg check.
Fixed that.
Added Brad Chapman to ACKS file, as the proud new owner of two
implicitly copyrighted lines of Python source code <wink>.
Repaired buffer_info's total lack of arg-checking.
Replaced memmove by memcpy in reverse() guts, as memmove is
often slower and the memory areas are guaranteed disjoint.
Replaced poke-and-hope unchecked decl of tmp buffer size by
assert-checked larger tmp buffer.
Got rid of inconsistent spaces before open paren in docstrings.
Added reverse() sanity tests to test_array.py.
|
| | |
|
| |
|
|
|
|
|
|
| |
Testing: test_array.py was also extended to check that one can set the
full range of values for each of the integral signed and unsigned
array types.
This closes SourceForge patch #100506.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'verbose' flag ala GvR updated test harness architecture.
Old way:
verbose = 0
if __name__ == '__main__':
verbose = 1
New way:
from test_support import verbose
Some other small readablility and functionality updates.
|
| |
|