[py-svn] r35254 - in py/dist/py/apigen/rest: . testing
fijal at codespeak.net
fijal at codespeak.net
Mon Dec 4 15:36:51 CET 2006
Author: fijal
Date: Mon Dec 4 15:36:49 2006
New Revision: 35254
Modified:
py/dist/py/apigen/rest/genrest.py
py/dist/py/apigen/rest/testing/test_rest.py
Log:
Fixed method resolution + origin.
Modified: py/dist/py/apigen/rest/genrest.py
==============================================================================
--- py/dist/py/apigen/rest/genrest.py (original)
+++ py/dist/py/apigen/rest/genrest.py Mon Dec 4 15:36:49 2006
@@ -356,7 +356,7 @@
lst = [title, LiteralBlock(self.dsa.get_doc(functionname)),
LiteralBlock(self.dsa.get_function_definition(functionname))]
- opar = Paragraph('origin: ')
+ opar = Paragraph(Em('origin'), ":")
if origin:
linktarget = self.writer.getlink('class', origin.name,
'class_%s' % (origin.name,))
@@ -365,7 +365,7 @@
opar.add(Text('<UNKNOWN>'))
lst.append(opar)
- lst.append(Paragraph("where:"))
+ lst.append(Paragraph(Em("where"), ":"))
args, retval = self.dsa.get_function_signature(functionname)
for name, _type in args + [('return value', retval)]:
l = self.process_type_link(_type)
@@ -385,14 +385,14 @@
local_changes = self.dsa.get_function_local_changes(functionname)
if local_changes:
- lst.append(Paragraph('changes in __dict__ after execution:'))
+ lst.append(Paragraph(Em('changes in __dict__ after execution'), ":"))
for k, changeset in local_changes.iteritems():
lst.append(ListItem('%s: %s' % (k, ', '.join(changeset))))
exceptions = self.dsa.get_function_exceptions(functionname)
if exceptions:
- lst.append(Paragraph('exceptions that might appear during '
- 'execution:'))
+ lst.append(Paragraph(Em('exceptions that might appear during '
+ 'execution'), ":"))
for exc in exceptions:
lst.append(ListItem(exc.__name__))
# XXX: right now we leave it alone
@@ -406,7 +406,7 @@
#else:
source = self.dsa.get_function_source(functionname)
if source:
- lst.append(Paragraph('function source:'))
+ lst.append(Paragraph(Em('function source'), ":"))
lst.append(LiteralBlock(source))
# call sites..
Modified: py/dist/py/apigen/rest/testing/test_rest.py
==============================================================================
--- py/dist/py/apigen/rest/testing/test_rest.py (original)
+++ py/dist/py/apigen/rest/testing/test_rest.py Mon Dec 4 15:36:49 2006
@@ -199,8 +199,8 @@
'method_SomeSubClass.method.txt',
'module_Unknown module.txt',
'traceback_SomeClass.__init__.0.txt',
- 'traceback_SomeClass.method.0.txt',
'traceback_SomeSubClass.__init__.0.txt',
+ 'traceback_SomeSubClass.method.0.txt',
'traceback_fun.0.txt',
'traceback_fun.1.txt',
]
@@ -374,7 +374,7 @@
assert -1 < source.find("x \:\: <Instance of AnyOf( `Class B`_ , "
"`Class A`_ )>") < call_point
source = tempdir.join('method_B.a.txt').read()
- assert source.find('origin\: `A`_') > -1
+ assert source.find('*origin* \: `A`_') > -1
self.check_rest(tempdir)
def test_exc_raising(self):
More information about the pytest-commit
mailing list