Commit 07c65884 authored by Antoine Pitrou's avatar Antoine Pitrou

Add a test that memoryviews have hash randomization enabled.

parent 528b54b2
......@@ -186,6 +186,12 @@ class BytesHashRandomizationTests(StringlikeHashRandomizationTests):
def test_empty_string(self):
self.assertEqual(hash(b""), 0)
class MemoryviewHashRandomizationTests(StringlikeHashRandomizationTests):
repr_ = "memoryview(b'abc')"
def test_empty_string(self):
self.assertEqual(hash(memoryview(b"")), 0)
class DatetimeTests(HashRandomizationTests):
def get_hash_command(self, repr_):
return 'import datetime; print(hash(%s))' % repr_
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment