Changeset 1620
- Timestamp:
- 02/16/07 21:15:28
- Files:
-
- trunk/cherrypy/lib/__init__.py (modified) (1 diff)
- trunk/cherrypy/test/test_config.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/lib/__init__.py
r1592 r1620 47 47 48 48 def build_CallFunc(self, o): 49 callee, args, starargs, kwargs = map(self.build, o.getChildren()) 50 return callee(args, *(starargs or ()), **(kwargs or {})) 49 children = map(self.build, o.getChildren()) 50 callee = children.pop(0) 51 kwargs = children.pop() or {} 52 starargs = children.pop() or () 53 args = tuple(children) + tuple(starargs) 54 return callee(*args, **kwargs) 51 55 52 56 def build_List(self, o): trunk/cherrypy/test/test_config.py
r1340 r1620 4 4 test.prefer_parent_path() 5 5 6 import os 6 7 import StringIO 7 8 import cherrypy … … 74 75 [/] 75 76 neg: -1234 77 filename: os.path.join(os.getcwd(), "hello.py") 76 78 """) 77 79 … … 98 100 ('/', 'foo', 'this'), 99 101 ('/', 'bar', 'that'), 100 ('/repr', 'neg', '-1234'),101 102 ('/xyz', 'foo', 'this'), 102 103 ('/foo/', 'foo', 'this2'), … … 134 135 self.assertBody(`expected`) 135 136 137 def testUnrepr(self): 138 self.getPage("/repr?key=neg") 139 self.assertBody("-1234") 140 141 self.getPage("/repr?key=filename") 142 self.assertBody(repr(os.path.join(os.getcwd(), "hello.py"))) 143 136 144 def testCustomNamespaces(self): 137 145 self.getPage("/raw/incr?num=12")

