Hi Hal,

I can't look at this right now, but I want to be sure this doesn't get
lost. I'm pretty sure this isn't just a problem in the test, so this
needs to be looked at. Can you open a ticket (milestone 1.0b1?)

Thanks,
Kevin

On 5/21/06, hal <[EMAIL PROTECTED]> wrote:
>
> Under py23,  something definately isn't working as expected in the
> tests.
>
> from one specific test:
> $ nosetests turbogears/widgets/tests/test_forms.py
> ERROR: turbogears.widgets.tests.test_forms.test_nested_variables
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File
> "/usr/lib/python2.3/site-packages/nose-0.9.0a2-py2.3.egg/nose/case.py",
> line 52, in runTest
>     self.testFunc()
>   File
> "/home/hwine/lib/python2.3/TurboGears-0.9a6-py2.3.egg/turbogears/widgets/tests/test_forms.py",
> line 176, in test_nested_variables
>     assert newroot.foo
> AttributeError: 'NestedController' object has no attribute 'foo'
>
> I've instrumented the code, and the method NestedController.checkform
> is not called in py23, but is in py24 (which passes the test).
>
> My python meta-programming is too weak to diagnosis this. If someone
> can point me to the issue, I can apply at the other locations. Here's
> the relevant source:
> class NestedController(controllers.Controller):
>     def checkform(self, foo):
>         self.foo = foo
>     checkform = expose()(checkform)
>     checkform = validate(form=nestedform)(checkform)
>
> def test_nested_variables():
>     cherrypy.request = oldrequest
>     newroot = NestedController()
>     cherrypy.root = None
>     cherrypy.tree.mount_points = {}
>     cherrypy.tree.mount(newroot, "/")
>     url =
> u"/checkform?foo.name=Kevin&foo.age=some%20NĂºmero".encode("utf-8")
>     create_request(url)
>     assert config.get("decoding_filter.encoding", path="/") == "utf8"
>     assert newroot.foo
>
> Thanks,
> --Hal
>
>
> >
>


-- 
Kevin Dangoor
TurboGears / Zesty News

email: [EMAIL PROTECTED]
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to