Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3.5
Changeset: r89531:da0283b19e53
Date: 2017-01-12 22:06 +0100
http://bitbucket.org/pypy/pypy/changeset/da0283b19e53/
Log: pyclbr analyses the source code, and does not return aliased and
renamed items. This happens for pickle.py, when the _pickle module
is not available.
diff --git a/lib-python/3/test/test_pyclbr.py b/lib-python/3/test/test_pyclbr.py
--- a/lib-python/3/test/test_pyclbr.py
+++ b/lib-python/3/test/test_pyclbr.py
@@ -125,7 +125,10 @@
raise
# Now check for missing stuff.
- def defined_in(item, module):
+ def defined_in(item, module, name):
+ if item.__name__ != name:
+ # Item was defined with another name
+ return False
if isinstance(item, type):
return item.__module__ == module.__name__
if isinstance(item, FunctionType):
@@ -134,7 +137,7 @@
for name in dir(module):
item = getattr(module, name)
if isinstance(item, (type, FunctionType)):
- if defined_in(item, module):
+ if defined_in(item, module, name):
self.assertHaskey(dict, name, ignore)
def test_easy(self):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit