On Thu, Jun 19, 2008 at 5:00 PM, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: >> Well, getting the tests to run on a configurable database would be >> pretty easy: we could put the engine string into a small configuration >> file (or common python module). > > SQLObject uses py.test + a -D-option, and before that it used an environment > variable. > >> But testing for schema stuff is more >> complex than that I guess (I've never used schema so much): you'd need >> to pass the extra parameter to all table/entities... > > Well, it the question what you want here. > > I was only after a way of testing that schema-support is working properly. > That would be easy to integrate: just check if the configured DB supports > schemas, create one - and then declare the test-classes within that schema.
> It's a different beast when you want to make *all* tests run inside a given > schema. But I don't see that as important. Well, I must have misunderstood you. I thought it was what you wanted and it made some sense because we've already had problems with schemas in different places, and testing them explicitly would be a bit tedious. Running normal tests through a schema would probably be more exhaustive. But anyway, whatever you had in mind should be good. More tests are (nearly) always good. >> hmmm... or we >> might get away with simply adding the schema to the default >> table_options... That's probably a good idea. I've created ticket >> http://elixir.ematia.de/trac/ticket/49 for this, though I don't >> consider this extremely high priority. Of course, a patch in that >> direction would be very likely to be accepted ;-). > > Well, if you tell me how you'd like to have the database connection being > specified for running the tests, I'm happy to supply a patch. We are using nosetests to run the test suite, so a command-line argument is out of the question. An environment variable, a configuration file, or a common python module for all test are all fine with me. I have a slight preference for the common python module as it could be used for more setup stuff... Replying to the list to see if anybody has some insight on this. > Then I add a > schema-test as described above - and the more general approach can wait. If > it will ever be realized. That'd be nice. -- Gaƫtan de Menten http://openhex.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SQLElixir" 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/sqlelixir?hl=en -~----------~----~----~----~------~----~------~--~---
