Re: Setting connection parameters in tests
"James Henstridge" <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
On 11/04/2008, Jorgen Austvik - Sun Norway <[email protected]> wrote: > Hi, > > when running the tests in psycopg/tests, the database name, database host, > port number and user name are hard coded. > > The attached patches let you change the default with environment variables, > which is nice to have if you e.g. want to test in client/server environment > over a network. > > I have used environment variable names from here: > http://www.postgresql.org/docs/8.2/interactive/app-psql.html > > An alternative implementation would be to place this functionality into the > driver itself. > > What do you think? Hi Jorgen, I've made some changes to the test suite since 2.0.6 that make it easier to run the entire test suite in one go. It uses the PSYCOPG2_TESTDB environment variable to pick which database to use for the tests, defaulting to "psycopg2_test". Is this enough for your uses, or do you need the other environment variables? If so, could you produce a patch against the current Subversion sources? You can make a checkout with: svn checkout http://initd.org/svn/psycopg/psycopg2/branches/2_0_x psycopg2 There has been a fair amount of work since 2.0.6, so patches against subversion head are more useful than those against the last tarball at this point. James.