summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pyclbr.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-09-04 01:20:04 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-09-04 01:20:04 (GMT)
commit37a309db7086381da6ae176cec8817cdd75de872 (patch)
tree739ce41938274ff80e891d5589a7ebe29cc2d6cb /Lib/test/test_pyclbr.py
parenta8aefe535c879c8b0f5201961648a89c8e3d7887 (diff)
downloadcpython-37a309db7086381da6ae176cec8817cdd75de872.zip
cpython-37a309db7086381da6ae176cec8817cdd75de872.tar.gz
cpython-37a309db7086381da6ae176cec8817cdd75de872.tar.bz2
builtin_dir(): Treat classic classes like types. Use PyDict_Keys instead
of PyMapping_Keys because we know we have a real dict. Tolerate that objects may have an attr named "__dict__" that's not a dict (Py_None popped up during testing). test_descr.py, test_dir(): Test the new classic-class behavior; beef up the new-style class test similarly. test_pyclbr.py, checkModule(): dir(C) is no longer a synonym for C.__dict__.keys() when C is a classic class (looks like the same thing that burned distutils! -- should it be *made* a synoym again? Then it would be inconsistent with new-style class behavior.).
Diffstat (limited to 'Lib/test/test_pyclbr.py')
-rw-r--r--Lib/test/test_pyclbr.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_pyclbr.py b/Lib/test/test_pyclbr.py
index e5de657..ce4d8ac 100644
--- a/Lib/test/test_pyclbr.py
+++ b/Lib/test/test_pyclbr.py
@@ -76,7 +76,7 @@ class PyclbrTest(unittest.TestCase):
self.assertListEq(real_bases, pyclbr_bases, ignore)
actualMethods = []
- for m in dir(py_item):
+ for m in py_item.__dict__.keys():
if type(getattr(py_item, m)) == MethodType:
actualMethods.append(m)
foundMethods = []