thanks for the reply. "paster setup-app" and "nosetests (functional tests)" both use the websetup.py to initialize database.
the initial database is very large so i wish nosetests can load another smaller sample database. i think to do this websetup must know which config file (prod or test) is running. do you have a better way to do this (seperate setup and nosetests)? ps: i find conf object has a key '__file__' store the configure file path. On Jun 11, 11:24 am, Jorge Vargas <[email protected]> wrote: > On Mon, Jun 8, 2009 at 3:20 AM, JeffreyHsu<[email protected]> wrote: > > > i want to know which config file (development.ini, test.ini) was > > loading when running setup-app or in deployment. > > > is there any method to get it? > > Umm I'm not sure. I think there is. I know there is a flag in the > environ set by paster that will tell you if it's testing = True. > > I think you should ask in the Paste mailing list to see if > PasteDeploy/PasteScript has a way to know which config file was used. > To be honest the answer could be a little more complex as Paste* > allows you to load more than one file. > > I think you could simply add a flag yourself to indicate which > environment you are in. > > But back to the original issue, why you want this? maybe there is a better > way. > > > > > thanks --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---

