On Fri, Mar 26, 2010 at 3:02 PM, andres <[email protected]> wrote:
> Sorry, I should have mentioned that I'm using a brand new Pylons
> 1.0rc1 project (setup via the go-pylons.py script). The nosetests are
> being run with the out-of-the-box configuration (setup.cfg:
> [nosetests] with-pylons = test.ini) and I haven't changed
> TestController.__init__(). Basically, I just setup the framework and
> added the tests I described in my post.
>
> Should the testing environment explicitly set the value of
> pylons.config to the result of load_environment()? How would you
> recommend accessing the runtime configuration from a standalone
> utility that isn't doing full application requests?

For now, you can just use ``app.config`` without bothering with
``pylons.config``. I tried to replicate your situation in an existing
test suite but I got an error saying pylons.url was not registered.
Dealing with these magic globals in tests is such a hassle because
they work in some places but not others and it can be difficult to pin
down what to do.  That's why I've long been hoping the globals would
be superceded by something non-global in Pylons 2.

Maybe somebody else can figure this one out.

-- 
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