Revision: 722
Author: keith.dart
Date: Thu May 9 15:59:46 2013
Log: Fix a couple of bugs.
http://code.google.com/p/pycopia/source/detail?r=722
Modified:
/trunk/QA/pycopia/QA/testinspector.py
/trunk/core/pycopia/logging.py
=======================================
--- /trunk/QA/pycopia/QA/testinspector.py Mon Oct 1 02:27:33 2012
+++ /trunk/QA/pycopia/QA/testinspector.py Thu May 9 15:59:46 2013
@@ -46,10 +46,10 @@
class TestmoduleVisitor(ast.NodeVisitor):
- def __init__(self, all=True):
+ def __init__(self, findall=True):
self._classes = {}
self._currentclass = None
- self.findall = all
+ self.findall = findall
def visit_ClassDef(self, node):
#print((node.body[0]))
@@ -86,16 +86,16 @@
return
-def find_classes(modname, all=True):
+def find_classes(modname, findall=True):
ast = get_ast(modname)
- nv = TestmoduleVisitor(all)
+ nv = TestmoduleVisitor(findall)
nv.visit(ast)
return nv._classes
def get_class(cls):
"""Return TestModuleVisitor report from a class instance."""
ast = get_ast(cls.__module__)
- nv = TestmoduleVisitor(all)
+ nv = TestmoduleVisitor()
nv.visit(ast)
return nv._classes[cls.__name__]
=======================================
--- /trunk/core/pycopia/logging.py Mon Apr 29 14:35:34 2013
+++ /trunk/core/pycopia/logging.py Thu May 9 15:59:46 2013
@@ -43,7 +43,7 @@
parts = []
for name, value in kwargs.items():
parts.append("{}: {!r}".format(name, value))
- print("DEBUG", " ".join(args), ", ".join(parts), file=sys.stderr)
+ print("DEBUG", " ".join(str(o) for o in args), ", ".join(parts),
file=sys.stderr)
# config file is optional here
try: