summaryrefslogtreecommitdiffstats
path: root/Lib/test/list_tests.py
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Accept None as start and stop parameters for list.index() and ↵Petri Lehtinen2011-11-061-7/+0
| | | | | | tuple.index()" Issue #13340.
* Accept None as start and stop parameters for list.index() and tuple.index()Petri Lehtinen2011-11-051-0/+7
| | | | Closes #13340.
* Merged revisions 86596 via svnmerge fromEzio Melotti2010-11-211-2/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........
* Use with open() as fo: ... instead of try: fo = open(...) finally: fo.close()Victor Stinner2010-05-161-6/+4
| | | | fo is not set if the open() fails.
* #7092 - Silence more py3k deprecation warnings, using ↵Florent Xicluna2010-03-211-1/+6
| | | | test_support.check_py3k_warnings() helper.
* Issue #7788: Fix a crash produced by deleting a list slice with hugeMark Dickinson2010-01-291-0/+3
| | | | step value. Patch by Marcin Bachry.
* Reverting the Revision: 77368. I committed Flox's big patch for tests bySenthil Kumaran2010-01-081-11/+2
| | | | mistake. ( It may come in for sure tough)
* Fixing - Issue7026 - RuntimeError: dictionary changed size during iteration. ↵Senthil Kumaran2010-01-081-2/+11
| | | | Patch by flox
* Backport r67478Raymond Hettinger2008-12-031-0/+2
|
* Patch #2167 from calvin: Remove unused importsChristian Heimes2008-02-231-1/+0
|
* Fix Issue 1045.Raymond Hettinger2007-12-061-2/+0
| | | | | Factor-out common calling code by simplifying the length_hint API. Speed-up the function by caching the PyObject_String for the attribute lookup.
* Fix a possible segfault from recursing too deep to get the repr of a list.Brett Cannon2007-09-101-0/+5
| | | | Closes issue #1096.
* Improve extended slicing support in builtin types and classes. Specifically:Thomas Wouters2007-08-281-0/+2
| | | | | | | | | | | | | | | | | | | | - 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.
* Forward-port of r52136,52138: a review of overflow-detecting code.Armin Rigo2006-10-041-3/+0
| | | | | | | | | | | | | | | | | | | | | | | * unified the way intobject, longobject and mystrtoul handle values around -sys.maxint-1. * in general, trying to entierely avoid overflows in any computation involving signed ints or longs is extremely involved. Fixed a few simple cases where a compiler might be too clever (but that's all guesswork). * more overflow checks against bad data in marshal.c. * 2.5 specific: fixed a number of places that were still confusing int and Py_ssize_t. Some of them could potentially have caused "real-world" breakage. * list.pop(x): fixing overflow issues on x was messy. I just reverted to PyArg_ParseTuple("n"), which does the right thing. (An obscure test was trying to give a Decimal to list.pop()... doesn't make sense any more IMHO) * trying to write a few tests...
* SF bug #1242657: list(obj) can swallow KeyboardInterruptRaymond Hettinger2005-08-211-0/+9
| | | | | | Fix over-aggressive PyErr_Clear(). The same code fragment appears in various guises in list.extend(), map(), filter(), zip(), and internally in PySequence_Tuple().
* Add list tests that ensure that remove() removes the first occurrence.Walter Dörwald2005-03-211-0/+20
| | | | (Copied from test_deque.py as suggested by Jim Jewett in SF bug #1166274)
* Improve test coverage.Raymond Hettinger2004-09-301-33/+0
|
* Improve test coverage.Raymond Hettinger2004-09-291-2/+101
|
* SF patch #1005778, Fix seg fault if list object is modified during list.index()Neal Norwitz2004-08-131-0/+12
| | | | Backport candidate
* For whatever reason, these files had \r\r\n line endings on Windows,Tim Peters2004-01-181-8/+8
| | | | | meaning they must have been checked in to CVS from a Linuxish box with Windowish \r\n line endings to begin with.
* Move list and tuple tests from test_types.py to their own scripts:Walter Dörwald2003-12-081-0/+418
test_tuple.py and test_list.py. Common tests for tuple, list and UserList are shared (in seq_tests.py and list_tests.py). Port tests to PyUnit. (From SF patch #736962)