[Python-checkins] r54154 - python/trunk/Lib/test/test_slice.py
georg.brandl
python-checkins at python.org
Tue Mar 6 12:51:17 CET 2007
Author: georg.brandl
Date: Tue Mar 6 12:51:14 2007
New Revision: 54154
Modified:
python/trunk/Lib/test/test_slice.py
Log:
A test case for the fix in #1674228.
Modified: python/trunk/Lib/test/test_slice.py
==============================================================================
--- python/trunk/Lib/test/test_slice.py (original)
+++ python/trunk/Lib/test/test_slice.py Tue Mar 6 12:51:14 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