summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_slice.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_slice.py b/Lib/test/test_slice.py
index d216c30..d8eb882 100644
--- a/Lib/test/test_slice.py
+++ b/Lib/test/test_slice.py
@@ -14,6 +14,11 @@ class SliceTest(unittest.TestCase):
def test_repr(self):
self.assertEqual(repr(slice(1, 2, 3)), "slice(1, 2, 3)")
+ def test_hash(self):
+ # Verify clearing of SF bug #800796
+ self.assertRaises(TypeError, hash, slice(5))
+ self.assertRaises(TypeError, slice(5).__hash__)
+
def test_cmp(self):
s1 = slice(1, 2, 3)
s2 = slice(1, 2, 3)