mirror of
https://github.com/python/cpython.git
synced 2025-07-31 07:04:42 +00:00
SF patch #1458476 with modifications based on discussions in python-dev. This
adds the following API calls: PySet_Clear(), _PySet_Next(), and _PySet_Update(). The latter two are considered non-public. Tests and documentation (for the public API) are included.
This commit is contained in:
parent
c259cc9c4c
commit
176014ffad
4 changed files with 75 additions and 6 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue