On May 30, 2010, at 7:56 PM, Eugueny Kontsevoy wrote: > Besides, I find those things (request/response) to be a secondary concern. I > like to start every project as a simple console/ncurses app with full test > coverage. Request/response and other UI is just a last minute snap-on, so I > don't like bending my test code over to carry around UI-specific objects. > "pylons.config" is vastly superior.
So the question... it obviously is damn useful to have them available. So even in the future when they're optional, I'd still like the option of using them to be fairly 'sane'. I can (and have now) added the setup of these objects to the Pylons nose extension, so at least app_globals and config will be present in tests from 1.0.1 and on. Of course, after looking at it, I realize that it would've been nice to know when the configuration period has *ended*, since then I know that I can populate the globals. At the moment, there is no definitive way to know when the configuration period of a Pylons app has actually completed. config.init_app is called, but then things, like app_globals, are added afterwards. So while my nose extension should help for testing purposes with the 1.0.1 release, going forward Pylons needs a way to more explicitly declare the *end* of the configuration stage. This would also help with making the global's more optional, which is part of my Pylons 1.1 intention. With the introduction of events in Pylons 1.1, it'll be fairly easy to make the globals optional, and when using the 'globals extension' or whatever it is named, it can just listen for the 'configuration ended' event, and register the globals for use with scripts/tests. Cheers, Ben -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-disc...@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.