Previously Mike Orr wrote:
> 
> On Mon, Jul 7, 2008 at 2:10 PM, Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
> >
> >
> > On Jul 7, 4:53 pm, "Mike Orr" <[EMAIL PROTECTED]> wrote:
> >> True.  I'm just saying if you can code to avoid 'g' and 'c' in your
> >> lib routines, so much the better.  I have never found a use for 'g',
> >> except in one case to put a structure of static data that's parsed on
> >> app startup (or read from a cache pickle).
> >
> > That is *exactly* what I use g for -- stashing 'static' data ( the
> > names and ids of 'options' that the database fkeys on .  example:
> >
> > query= "select * from _gender"
> > for row in rows:
> >   g.gender.id[ row.id ]= row.name
> >   g.gender.name[ row.name ]= row.id
> >
> > i also have some other misc. config data -- like amazon s3 urls, etc
> > - which are initialized on startup based out of config values.
> >
> > i'm a little less-than-enthusiastic by the built in testing with
> > Pylons.  not having g,c,session is annoying.
> 
> You're not initializing the application completely and you're
> wondering why it isn't working?  Don't you see the contradiction
> there?
> 
> > i've also noticed that
> > for every test it does a full app initialization - which means ( in my
> > case ) querying the database for 50 tables worth of data.
> 
> Unit tests always do that: setUp creates a full test environment,
> which is discarded after each test.

Can we please make sure our test terminology is correct? A unit test
will never do that since it tests as little code as possible in an
isolated environment, preferably using mock objects.

Integration tests however do setup the whole application.

Wichert.
-- 
Wichert Akkerman <[EMAIL PROTECTED]>    It is simple to make things.
http://www.wiggy.net/                   It is hard to make things simple.

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