Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 1312

Show
Ignore:
Timestamp:
09/02/06 02:58:39
Author:
fumanchu
Message:

Fix for #506 (unrepr should support negative numbers).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/lib/__init__.py

    r1243 r1312  
    9898    def build_NoneType(self, o): 
    9999        return None 
     100     
     101    def build_UnarySub(self, o): 
     102        return -self.build_Const(o.getChildren()[0]) 
     103     
     104    def build_UnaryAdd(self, o): 
     105        return self.build_Const(o.getChildren()[0]) 
    100106 
    101107 
  • trunk/cherrypy/test/test_config.py

    r1299 r1312  
    1919            return cherrypy.request.config.get(key, "None") 
    2020        index = cherrypy.expose(index, alias=('global_', 'xyz')) 
     21         
     22        def repr(self, key): 
     23            return repr(cherrypy.request.config.get(key, None)) 
     24        repr.exposed = True 
    2125     
    2226    class Foo: 
     
    4145        index.exposed = True 
    4246     
     47    ioconf = StringIO.StringIO(""" 
     48[/] 
     49neg: -1234 
     50""") 
     51     
    4352    root = Root() 
    4453    root.foo = Foo() 
    45     cherrypy.tree.mount(root
     54    cherrypy.tree.mount(root, config=ioconf
    4655    cherrypy.tree.mount(Another(), "/another") 
    4756    cherrypy.config.update({'environment': 'test_suite'}) 
     
    6271            ('/',        'foo', 'this'), 
    6372            ('/',        'bar', 'that'), 
     73            ('/repr',    'neg', '-1234'), 
    6474            ('/xyz',     'foo', 'this'), 
    6575            ('/foo/',    'foo', 'this2'), 

Hosted by WebFaction

Log in as guest/cpguest to create tickets