From: Mike Bayer Date: Wed, 15 Jul 2009 18:48:10 +0000 (+0000) Subject: - fix driver imports X-Git-Tag: rel_0_6_6~132 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=360a2018d06c54a0516827b6eb5075c63ec1b55a;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - fix driver imports - update info on special schema names in unittest README --- diff --git a/README.unittests b/README.unittests index ca16788d9b..89a8f39e4d 100644 --- a/README.unittests +++ b/README.unittests @@ -78,9 +78,12 @@ another database, use the --dburi option with any standard SQLAlchemy URL: --dburi=postgresql://user:password@localhost/test -Use an empty database and a database user with general DBA privileges. The -test suite will be creating and dropping many tables and other DDL, and -preexisting tables will interfere with the tests +Use an empty database and a database user with general DBA privileges. +The test suite will be creating and dropping many tables and other DDL, and +preexisting tables will interfere with the tests. + +IMPORTANT !: please see TIPS at the end if your are testing on POSTGRESQL, +ORACLE, or MSSQL - additional steps are required to prepare a test database. If you'll be running the tests frequently, database aliases can save a lot of typing. The --dbs option lists the built-in aliases and their matching URLs: @@ -168,13 +171,23 @@ IRC! TIPS ---- -PostgreSQL: The tests require an 'alt_schema' and 'alt_schema_2' to be present in + +PostgreSQL: The tests require an 'test_schema' and 'test_schema_2' to be present in the testing database. -PostgreSQL: When running the tests on postgresql, postgresql can get slower and -slower each time you run the tests. This seems to be related to the constant -creation/dropping of tables. Running a "VACUUM FULL" on the database will -speed it up again. +Oracle: the database owner should be named "scott" (this will be fixed), +and an additional "owner" named "ed" is required: + +1. create a user 'ed' in the oracle database. +2. in 'ed', issue the following statements: + create table parent(id integer primary key, data varchar2(50)); + create table child(id integer primary key, data varchar2(50), parent_id integer references parent(id)); + create synonym ptable for parent; + create synonym ctable for child; + grant all on parent to scott; (or to whoever you run the oracle tests as) + grant all on child to scott; (same) + grant all on ptable to scott; + grant all on ctable to scott; MSSQL: Tests that involve multiple connections require Snapshot Isolation ability implented on the test database in order to prevent deadlocks that will diff --git a/lib/sqlalchemy/dialects/mssql/__init__.py b/lib/sqlalchemy/dialects/mssql/__init__.py index a5fabbade1..e3a829047c 100644 --- a/lib/sqlalchemy/dialects/mssql/__init__.py +++ b/lib/sqlalchemy/dialects/mssql/__init__.py @@ -1,3 +1,3 @@ -from sqlalchemy.dialects.mssql import base, pyodbc +from sqlalchemy.dialects.mssql import base, pyodbc, adodbapi, pymssql base.dialect = pyodbc.dialect \ No newline at end of file diff --git a/lib/sqlalchemy/dialects/mssql/pymssql.py b/lib/sqlalchemy/dialects/mssql/pymssql.py index 475cc398af..0961c2e760 100644 --- a/lib/sqlalchemy/dialects/mssql/pymssql.py +++ b/lib/sqlalchemy/dialects/mssql/pymssql.py @@ -1,4 +1,4 @@ -from sqlalchemy.dialects.mssql.base import MSDialect, MSDateTimeAsDate, MSDateTimeAsTime +from sqlalchemy.dialects.mssql.base import MSDialect from sqlalchemy import types as sqltypes diff --git a/lib/sqlalchemy/dialects/mysql/__init__.py b/lib/sqlalchemy/dialects/mysql/__init__.py index e94acc64e3..4106a299be 100644 --- a/lib/sqlalchemy/dialects/mysql/__init__.py +++ b/lib/sqlalchemy/dialects/mysql/__init__.py @@ -1,4 +1,4 @@ -from sqlalchemy.dialects.mysql import base, mysqldb +from sqlalchemy.dialects.mysql import base, mysqldb, pyodbc, zxjdbc # default dialect base.dialect = mysqldb.dialect \ No newline at end of file diff --git a/lib/sqlalchemy/dialects/postgresql/__init__.py b/lib/sqlalchemy/dialects/postgresql/__init__.py index 77eca4aee5..af9430a2b0 100644 --- a/lib/sqlalchemy/dialects/postgresql/__init__.py +++ b/lib/sqlalchemy/dialects/postgresql/__init__.py @@ -1,3 +1,3 @@ -from sqlalchemy.dialects.postgresql import base, psycopg2 +from sqlalchemy.dialects.postgresql import base, psycopg2, pg8000, zxjdbc base.dialect = psycopg2.dialect \ No newline at end of file