summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_array.py
Commit message (Collapse)AuthorAgeFilesLines
* Merged revisions ↵Benjamin Peterson2008-12-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 67898,67904-67907,67912,67918,67920-67921,67923-67924,67927,67930,67932,67943 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r67898 | benjamin.peterson | 2008-12-21 15:00:53 -0600 (Sun, 21 Dec 2008) | 1 line compute DISTVERSION with patchlevel.py ........ r67904 | benjamin.peterson | 2008-12-22 14:44:58 -0600 (Mon, 22 Dec 2008) | 1 line less attitude ........ r67905 | benjamin.peterson | 2008-12-22 14:51:15 -0600 (Mon, 22 Dec 2008) | 1 line fix #4720: the format to PyArg_ParseTupleAndKeywords can now start with '|' ........ r67906 | benjamin.peterson | 2008-12-22 14:52:53 -0600 (Mon, 22 Dec 2008) | 1 line add NEWS note ........ r67907 | benjamin.peterson | 2008-12-22 16:12:19 -0600 (Mon, 22 Dec 2008) | 1 line silence compiler warning ........ r67912 | georg.brandl | 2008-12-23 06:37:21 -0600 (Tue, 23 Dec 2008) | 2 lines Fix missing "svn" command. ........ r67918 | georg.brandl | 2008-12-23 09:44:25 -0600 (Tue, 23 Dec 2008) | 2 lines Markup fix. ........ r67920 | benjamin.peterson | 2008-12-23 14:09:28 -0600 (Tue, 23 Dec 2008) | 1 line use a global variable, so the compiler doesn't optimize the assignment out ........ r67921 | benjamin.peterson | 2008-12-23 14:12:33 -0600 (Tue, 23 Dec 2008) | 1 line make global static ........ r67923 | benjamin.peterson | 2008-12-24 09:10:27 -0600 (Wed, 24 Dec 2008) | 1 line #4736 BufferRWPair.closed shouldn't try to call another property as a function ........ r67924 | benjamin.peterson | 2008-12-24 10:10:05 -0600 (Wed, 24 Dec 2008) | 1 line pretend exceptions don't exist a while longer ........ r67927 | benjamin.peterson | 2008-12-26 17:26:30 -0600 (Fri, 26 Dec 2008) | 1 line python version is included in file name now ........ r67930 | hirokazu.yamamoto | 2008-12-26 22:19:48 -0600 (Fri, 26 Dec 2008) | 2 lines Issue #4740: Use HIGHEST_PROTOCOL in pickle test. (There is no behavior difference in 2.x because HIGHEST_PROTOCOL == 2) ........ r67932 | alexandre.vassalotti | 2008-12-27 00:36:10 -0600 (Sat, 27 Dec 2008) | 5 lines Remove unnecessary casts related to unicode_decode_call_errorhandler. Make the _PyUnicode_Resize macro a static function. These changes are needed to avoid breaking strict aliasing rules. ........ r67943 | alexandre.vassalotti | 2008-12-27 04:02:59 -0600 (Sat, 27 Dec 2008) | 2 lines Fix bogus unicode tests in pickletester. ........
* fix for issue 3862: test_array fails FreeBSD 7 amd64Andrew MacIntyre2008-10-011-4/+5
| | | | | | | | | FreeBSD 7's underlying malloc() is behaves differently to earlier versions and seriously overcommits available memory on amd64. This may affect other 64bit platforms in some circumstances, so the scale of the problematic test is wound back. Patch by Mark Dickinson, reviewed by Martin von Loewis.
* Merge in release25-maint r60793:Gregory P. Smith2008-06-111-0/+17
| | | | | | 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.
* Remove the test file before writing it in case there is no write permission.Neal Norwitz2008-04-101-0/+1
| | | | | | 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).
* Patch #2167 from calvin: Remove unused importsChristian Heimes2008-02-231-1/+1
|
* Improve extended slicing support in builtin types and classes. Specifically:Thomas Wouters2007-08-281-0/+34
| | | | | | | | | | | | | | | | | | | | - 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.
* Fix warnings about object.__init__() signature.Guido van Rossum2007-04-021-1/+0
| | | | | | 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.
* SF #1693079: Cannot save empty array in shelveRaymond Hettinger2007-04-021-0/+15
|
* Bug #1486663: don't reject keyword arguments for subclasses of builtinGeorg Brandl2007-01-211-0/+7
| | | | types.
* Fix SF bug #1545837: array.array borks on deepcopy.Thomas Wouters2006-08-241-0/+7
| | | | | 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.)
* Fix one of the tests that fails on the "x86 OpenBSD trunk" buildbot,Tim Peters2006-04-101-1/+1
| | | | | 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.
* as is on the road to keyword-hood, use a different var name.Neal Norwitz2006-03-171-7/+7
|
* Add a slice test with high < low.Walter Dörwald2005-01-211-0/+5
|
* SF #1085304: Make array.array pickle-ableRaymond Hettinger2004-12-161-0/+19
|
* SF feature request #992967: array.array objects should support sequences.Raymond Hettinger2004-08-291-3/+35
| | | | Made the constructor accept general iterables.
* Add weakref support to array.array and file objects.Raymond Hettinger2004-05-311-0/+10
|
* SF feature request #686323: Minor array module enhancementsRaymond Hettinger2004-03-141-0/+7
| | | | | | | 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.
* SF bug #910986: copy.copy fails for array.arrayRaymond Hettinger2004-03-131-0/+7
| | | | Added support for the copy module.
* protect against test problems with JythonSkip Montanaro2003-08-031-6/+7
|
* added test for bug 782369Skip Montanaro2003-08-031-0/+9
|
* Walter's last checkin also needs to work on doubles.Neal Norwitz2003-05-221-7/+3
| | | | | * Move new test_byteswap into FPTest. * Remove extra lines at end of file.
* test_byteswap() fails on alphas, because treating the byte swapped bitWalter Dörwald2003-05-221-0/+17
| | | | | | | | | | 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.
* Fix array.array.insert(), so that it treats negative indices asWalter Dörwald2003-05-181-0/+24
| | | | | being relative to the end of the array, just like list.insert() does. This closes SF bug #739313.
* Add another error case to the insert test.Walter Dörwald2003-05-181-0/+1
|
* Port test_array and test_winsound to PyUnit. Enhance tests for arrayWalter Dörwald2003-05-181-363/+821
| | | | | | (code coverage for Modules/arraymodule.c is at 91%) From SF patch #736962.
* SF patch #662433: Fill arraymodule's tp_iter and sq_contains slotsRaymond Hettinger2003-01-071-0/+6
|
* Fix forMichael W. Hudson2002-07-291-0/+3
| | | | | | [ 587875 ] crash on deleting extended slice The array code got simpler, always a good thing!
* Get rid of relative imports in all unittests. Now anything thatBarry Warsaw2002-07-231-1/+1
| | | | | | | | | | | 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. :)
* Fix the bug described inMichael W. Hudson2002-06-191-1/+42
| | | | | | | | | 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.
* This is patchMichael W. Hudson2002-05-151-28/+30
| | | | | | | [ 555382 ] test_array v.s. --disable-unicode + MvL's suggestions. Just the 32 failing tests in --disable-unicode builds now...
* Patch 520694: arraymodule.c improvements:Martin v. Löwis2002-03-011-4/+141
| | | | | | - make array.array a type - add Py_UNICODE arrays - support +=, *=
* a bold attempt to fix things broken by MAL's verify patch: importFredrik Lundh2001-01-171-1/+1
| | | | 'verify' iff it's used by a test module...
* This patch removes all uses of "assert" in the regression test suiteMarc-André Lemburg2001-01-171-1/+1
| | | | | | | 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.
* Verify that str(a) and repr(a) don't blow up (part of SF patch 102068).Tim Peters2000-11-141-0/+5
|
* Make reindent.py happy (convert everything to 4-space indents!).Fred Drake2000-10-231-161/+160
|
* arraymodule: Fix SF bug 113960.Tim Peters2000-09-161-2/+12
| | | | | | | | | | | | | | 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.
* added count, extend, index, pop and remove to arraymodulePeter Schneider-Kamp2000-07-311-0/+40
|
* Trent Mick <trentm@activestate.com>:Fred Drake2000-06-281-2/+54
| | | | | | | | 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.
* Add tests for array self-assigns. (This one has no relevance to JPython.)Guido van Rossum1998-07-161-1/+28
|
* Mass check-in after untabifying all files that need it.Guido van Rossum1998-03-261-38/+38
|
* Use `...` around binary strings.Guido van Rossum1997-10-071-1/+1
|
* Use TESTFN instead of /etc/passwd and /dev/null as test files.Guido van Rossum1997-04-091-5/+12
|
* Many scripts, but small changes. Update the way the scripts obtain theRoger E. Masse1996-12-201-13/+25
| | | | | | | | | | | | | | | | '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.
* module to test the arraymodule created and added to testall.pyRoger E. Masse1996-12-091-0/+40