aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_set.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_set.py')
-rw-r--r--Lib/test/test_set.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py
index 6ff12154aa0..0268be272d8 100644
--- a/Lib/test/test_set.py
+++ b/Lib/test/test_set.py
@@ -224,7 +224,7 @@ class TestJointOps(unittest.TestCase):
# Bug #1257731
class H(self.thetype):
def __hash__(self):
- return id(self)
+ return int(id(self) & 0x7fffffff)
s=H()
f=set()
f.add(s)
@@ -421,7 +421,7 @@ class TestSet(TestJointOps):
self.assertRaises(ReferenceError, str, p)
# C API test only available in a debug build
- if hasattr(sys, "gettotalrefcount"):
+ if hasattr(set, "test_c_api"):
def test_c_api(self):
self.assertEqual(set('abc').test_c_api(), True)