Commit Graph

10 Commits

Author SHA1 Message Date
Nick Coghlan 48361f5cbf Issue 2235: Py3k warnings are now emitted for classes that will no longer inherit a__hash__ implementation from a parent class in Python 3.x. The standard library and test suite have been updated to not emit these warnings. 2008-08-11 15:45:58 +00:00
Mark Dickinson 1ec2fcd16e Issue #3004: Minor fix to slice.indices(). slice(-10).indices(9) now
returns (0, 0, 1) instead of (0, -1, 1), and slice(None, 10, -1).indices(10)
returns (9, 9, -1) instead of (9, 10, -1).
2008-06-20 14:53:43 +00:00
Raymond Hettinger 13936697f6 SF 1191699: Make slices picklable 2007-04-11 18:40:58 +00:00
Georg Brandl 3071a1aec9 A test case for the fix in #1674228. 2007-03-06 11:51:14 +00:00
Raymond Hettinger b859c070ef SF bug #800796: Difference between hash() and __hash__()
slice(5).__hash__() now raises a TypeError.
2003-09-05 14:27:30 +00:00
Raymond Hettinger 5d2e777787 SF patch #736962: Port tests to unittest (Part 2)
(Contributed by Walter Dörwald.)

* Convert test_slice.py to unittest format
* Expand the test coverage.
2003-09-02 01:53:01 +00:00
Michael W. Hudson 173f11da5d Some days, I think my comment of
/* this is harder to get right than you might think */

angered some God somewhere.  After noticing

    >>> range(5000000)[slice(96360, None, 439)]
    []

I found that my cute test for the slice being empty failed due to
overflow.  Fixed, and added simple test (not the above!).
2002-11-05 15:28:51 +00:00
Tim Peters 469cdad822 Whitespace normalization. 2002-08-08 20:19:19 +00:00
Barry Warsaw 04f357cffe Get rid of relative imports in all unittests. Now anything that
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. :)
2002-07-23 19:04:11 +00:00
Michael W. Hudson f0d777c56b A few days ago, Guido said (in the thread "[Python-Dev] Python
version of PySlice_GetIndicesEx"):

> OK.  Michael, if you want to check in indices(), go ahead.

Then I did what was needed, but didn't check it in.  Here it is.
2002-07-19 15:47:06 +00:00