[Python-checkins] python/dist/src/Lib/test test_set.py,1.21,1.22
rhettinger@users.sourceforge.net
rhettinger at users.sourceforge.net
Tue Aug 16 12:44:25 CEST 2005
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10493/Lib/test
Modified Files:
test_set.py
Log Message:
Numerous fix-ups to C API and docs. Added tests for C API.
Index: test_set.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_set.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- test_set.py 12 Aug 2005 23:58:22 -0000 1.21
+++ test_set.py 16 Aug 2005 10:44:15 -0000 1.22
@@ -6,6 +6,7 @@
import pickle
import os
from random import randrange, shuffle
+import sys
class PassThru(Exception):
pass
@@ -402,6 +403,11 @@
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 @@
#==============================================================================
def test_main(verbose=None):
- import sys
from test import test_sets
test_classes = (
TestSet,
More information about the Python-checkins
mailing list