2021-04-22 20:31:11 +00:00
|
|
|
Index: immutables-0.15/tests/test_none_keys.py
|
|
|
|
|
===================================================================
|
|
|
|
|
--- immutables-0.15.orig/tests/test_none_keys.py
|
|
|
|
|
+++ immutables-0.15/tests/test_none_keys.py
|
2020-12-07 15:55:27 +00:00
|
|
|
@@ -1,8 +1,10 @@
|
|
|
|
|
import unittest
|
2021-04-22 20:31:11 +00:00
|
|
|
+import sys
|
2020-12-07 15:55:27 +00:00
|
|
|
|
|
|
|
|
from immutables.map import map_hash, map_mask, Map as PyMap
|
2021-04-22 20:31:11 +00:00
|
|
|
from immutables._testutils import HashKey
|
2020-12-07 15:55:27 +00:00
|
|
|
|
|
|
|
|
+is_32bits = sys.maxsize <= 2**32 # 32bit-dness
|
|
|
|
|
|
|
|
|
|
none_hash = map_hash(None)
|
|
|
|
|
assert(none_hash != 1)
|
|
|
|
|
@@ -35,6 +37,8 @@ class NoneCollision(HashKey):
|
|
|
|
|
class BaseNoneTest:
|
|
|
|
|
Map = None
|
|
|
|
|
|
|
|
|
|
+ @unittest.skipIf(is_32bits,
|
|
|
|
|
+ "fail on 32bit arch, gh#MagicStack/immutables#53")
|
|
|
|
|
def test_none_collisions(self):
|
|
|
|
|
collisions = [NoneCollision('a', level) for level in range(7)]
|
|
|
|
|
indices = [map_mask(none_hash, shift) for shift in range(0, 32, 5)]
|