On Sat, Feb 11, 2012 at 11:54 AM, Jonathan Vanasco
<[email protected]> wrote:
> actually, screw that. unit testing for a series of helper wrappers is
> too difficult in pylons.

Yes, I've come to that conclusion too. It's one of the main reasons
Pylons 2 switched to Pyramid. It's why I've long been saying that
magic globals are evil. They don't work in unit tests until the
environment has been set up sufficiently. Basically, they're
guaranteed only when your test class has been set up as a
"controller", which mimics a live request environment. The problems
usually occur when you try to use the globals in your setup code or at
module level -- most commonly 'config'.  There are various hacks to
get the globals to work at that point, but the best answer is to use
Pyramid where testing is more straightforward and reliable.

-- 
Mike Orr <[email protected]>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en.

Reply via email to