On Oct 20, 8:37 pm, "Mark Ramm" <[EMAIL PROTECTED]> wrote: > Hmm, I don't have an easy solution here. But I think we should keep > in mind that we should not create too much extra complexity just to > hide something from the quickstart, as there's a lot of value in > simplicity and transparency. If there's anything good about the > quickstart template being so big, it's that it makes the framework > more transparent once you understand it.
Agreed. Though it seems kind of odd to have part of the test infrastructure in quickstart tests/__int__.py (TestController), and part in tg2/tg/testutil.py (DBTest). So, I'm not quite ready to give up yet... :-) > So, I'd say that for now we should close this ticket as wontfix, > because I can't think of a "clean" way to do it inside tg itself > either. > > But if somebody has a better idea I'm open to suggestions ;) I thought perhaps I was missing something obvious re: how to get an app to run against in test_testutil.py, but apparently not. So, how about this: * put a try: ... except KeyError around the the code that initializes the application via websetup with the project's test.ini configuration file so that it gets skipped when there is no config['package'] i.e. when nosetests is run on tg2/ * make use of the shiny new test_stack infrastructure to test TestController - I think I could use something like TestConfig.__init__() to set up the config so that I can do "from testutil import TestController" and confirm that it creates a TestApp instance. I haven't tried the 2nd part yet. I'll let you know how it goes. Doug --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears Trunk" 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-trunk?hl=en -~----------~----~----~----~------~----~------~--~---
