[svn r38504] fixes for python2.3
--HG-- branch : trunk
This commit is contained in:
@@ -10,6 +10,8 @@ from py.__.apigen.rest.genrest import split_of_last_part
|
||||
from py.__.apigen.linker import relpath
|
||||
from py.__.apigen.html import H
|
||||
|
||||
reversed = py.builtin.reversed
|
||||
|
||||
sorted = py.builtin.sorted
|
||||
html = py.xml.html
|
||||
raw = py.xml.raw
|
||||
@@ -423,7 +425,7 @@ class ApiPageBuilder(AbstractPageBuilder):
|
||||
if isinstance(val, property):
|
||||
val = '<property object (dynamically calculated value)>'
|
||||
properties.append((attr, val))
|
||||
properties.sort(key=lambda a: a[0]) # sort on name
|
||||
properties.sort(lambda x,y : cmp(x[0], y[0])) # sort on name
|
||||
return properties
|
||||
|
||||
def build_methods(self, dotted_name):
|
||||
|
||||
@@ -23,7 +23,7 @@ class TestFullModule(object):
|
||||
|
||||
def test_init(self):
|
||||
ds = self.ds
|
||||
print sorted(ds.descs.keys())
|
||||
print py.builtin.sorted(ds.descs.keys())
|
||||
assert len(ds.descs) == 6
|
||||
assert py.builtin.sorted(ds.descs.keys()) == [
|
||||
'notpak.notmod.notclass', 'notpak.notmod.notclass.__init__',
|
||||
|
||||
Reference in New Issue
Block a user