diff options
author | Raymond Hettinger <python@rcn.com> | 2005-08-16 10:44:15 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2005-08-16 10:44:15 (GMT) |
commit | c47e01d02021253dd9f8fd4ced6eb663436431bb (patch) | |
tree | 3dfdff12be9ad6bcd12db7f2e4caa770c66cf069 /Lib | |
parent | 994c2c1c69d86ca1b94a489ba573078297996a6d (diff) | |
download | cpython-c47e01d02021253dd9f8fd4ced6eb663436431bb.zip cpython-c47e01d02021253dd9f8fd4ced6eb663436431bb.tar.gz cpython-c47e01d02021253dd9f8fd4ced6eb663436431bb.tar.bz2 |
Numerous fix-ups to C API and docs. Added tests for C API.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_set.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py index f393712..2ebeff6 100644 --- a/Lib/test/test_set.py +++ b/Lib/test/test_set.py @@ -6,6 +6,7 @@ import copy import pickle import os from random import randrange, shuffle +import sys class PassThru(Exception): pass @@ -402,6 +403,11 @@ class TestSet(TestJointOps): s = None self.assertRaises(ReferenceError, str, p) + # C API test only available in a debug build + if hasattr(sys, "gettotalrefcount"): + def test_c_api(self): + self.assertEqual(set('abc').test_c_api(), True) + class SetSubclass(set): pass @@ -1372,7 +1378,6 @@ class TestVariousIteratorArgs(unittest.TestCase): #============================================================================== def test_main(verbose=None): - import sys from test import test_sets test_classes = ( TestSet, |