diff options
author | Georg Brandl <georg@python.org> | 2007-03-06 11:51:14 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-03-06 11:51:14 (GMT) |
commit | 3071a1aec949d33fdea2150784860e14a17f674f (patch) | |
tree | ad7a62fab6af04a67dfbae9c61c97149d72544a0 /Lib/test/test_slice.py | |
parent | 3eb764898676c3d8fd4df5c40f62607f3155037c (diff) | |
download | cpython-3071a1aec949d33fdea2150784860e14a17f674f.zip cpython-3071a1aec949d33fdea2150784860e14a17f674f.tar.gz cpython-3071a1aec949d33fdea2150784860e14a17f674f.tar.bz2 |
A test case for the fix in #1674228.
Diffstat (limited to 'Lib/test/test_slice.py')
-rw-r--r-- | Lib/test/test_slice.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_slice.py b/Lib/test/test_slice.py index d8eb882..c34d9ea 100644 --- a/Lib/test/test_slice.py +++ b/Lib/test/test_slice.py @@ -92,6 +92,17 @@ class SliceTest(unittest.TestCase): 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) |