[Python-checkins] r54155 - python/branches/release25-maint/Lib/test/test_slice.py
georg.brandl
python-checkins at python.org
Tue Mar 6 12:51:29 CET 2007
Author: georg.brandl
Date: Tue Mar 6 12:51:27 2007
New Revision: 54155
Modified:
python/branches/release25-maint/Lib/test/test_slice.py
Log:
A test case for the fix in #1674228.
(backport from rev. 54154)
Modified: python/branches/release25-maint/Lib/test/test_slice.py
==============================================================================
--- python/branches/release25-maint/Lib/test/test_slice.py (original)
+++ python/branches/release25-maint/Lib/test/test_slice.py Tue Mar 6 12:51:27 2007
@@ -92,6 +92,17 @@
self.assertRaises(OverflowError, slice(None).indices, 1L<<100)
+ def test_setslice_without_getslice(self):
+ tmp = []
+ class X(object):
+ def __setslice__(self, i, j, k):
+ tmp.append((i, j, k))
+
+ x = X()
+ x[1:2] = 42
+ self.assertEquals(tmp, [(1, 2, 42)])
+
+
def test_main():
test_support.run_unittest(SliceTest)
More information about the Python-checkins
mailing list