summaryrefslogtreecommitdiffstats
path: root/Lib/test/pyclbr_input.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/pyclbr_input.py')
-rw-r--r--Lib/test/pyclbr_input.py68
1 files changed, 60 insertions, 8 deletions
diff --git a/Lib/test/pyclbr_input.py b/Lib/test/pyclbr_input.py
index 19ccd62..5535edb 100644
--- a/Lib/test/pyclbr_input.py
+++ b/Lib/test/pyclbr_input.py
@@ -12,17 +12,19 @@ class B (object):
def bm(self): pass
class C (B):
- foo = Other().foo
- om = Other.om
-
d = 10
- # XXX: This causes test_pyclbr.py to fail, but only because the
- # introspection-based is_method() code in the test can't
- # distinguish between this and a genuine method function like m().
- # The pyclbr.py module gets this right as it parses the text.
+ # This one is correctly considered by both test_pyclbr.py and pyclbr.py
+ # as a non-method of C.
+ foo = Other().foo
+
+ # This causes test_pyclbr.py to fail, but only because the
+ # introspection-based is_method() code in the test can't
+ # distinguish between this and a genuine method function like m().
#
- #f = f
+ # The pyclbr.py module gets this right as it parses the text.
+ om = Other.om
+ f = f
def m(self): pass
@@ -31,3 +33,53 @@ class C (B):
@classmethod
def cm(self): pass
+
+# Check that mangling is correctly handled
+
+class a:
+ def a(self): pass
+ def _(self): pass
+ def _a(self): pass
+ def __(self): pass
+ def ___(self): pass
+ def __a(self): pass
+
+class _:
+ def a(self): pass
+ def _(self): pass
+ def _a(self): pass
+ def __(self): pass
+ def ___(self): pass
+ def __a(self): pass
+
+class __:
+ def a(self): pass
+ def _(self): pass
+ def _a(self): pass
+ def __(self): pass
+ def ___(self): pass
+ def __a(self): pass
+
+class ___:
+ def a(self): pass
+ def _(self): pass
+ def _a(self): pass
+ def __(self): pass
+ def ___(self): pass
+ def __a(self): pass
+
+class _a:
+ def a(self): pass
+ def _(self): pass
+ def _a(self): pass
+ def __(self): pass
+ def ___(self): pass
+ def __a(self): pass
+
+class __a:
+ def a(self): pass
+ def _(self): pass
+ def _a(self): pass
+ def __(self): pass
+ def ___(self): pass
+ def __a(self): pass