summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-09-04 23:53:20 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-09-04 23:53:20 (GMT)
commitc4536a1deab6b14e4579e453289bd7648d144d36 (patch)
tree08d06248d1ba5fbf2932d690d421e2ec212b39da /Lib
parent2a72f19528a6f083804106c8115ee4d6d0d01943 (diff)
downloadcpython-c4536a1deab6b14e4579e453289bd7648d144d36.zip
cpython-c4536a1deab6b14e4579e453289bd7648d144d36.tar.gz
cpython-c4536a1deab6b14e4579e453289bd7648d144d36.tar.bz2
Teach a test about the different kinds of functions.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_pyclbr.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_pyclbr.py b/Lib/test/test_pyclbr.py
index ae8a396..ceb7a3d 100644
--- a/Lib/test/test_pyclbr.py
+++ b/Lib/test/test_pyclbr.py
@@ -4,7 +4,7 @@
'''
from test.test_support import run_unittest
import unittest, sys
-from types import ClassType, FunctionType, MethodType
+from types import ClassType, FunctionType, MethodType, BuiltinFunctionType
import pyclbr
from unittest import TestCase
@@ -92,7 +92,7 @@ class PyclbrTest(TestCase):
self.assertHasattr(module, name, ignore)
py_item = getattr(module, name)
if isinstance(value, pyclbr.Function):
- self.assertEquals(type(py_item), FunctionType)
+ self.assert_(isinstance(py_item, (FunctionType, BuiltinFunctionType)))
else:
self.failUnless(isinstance(py_item, (ClassType, type)))
real_bases = [base.__name__ for base in py_item.__bases__]