Update of /cvsroot/modeling/ProjectModeling/Modeling/tests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18979/Modeling/tests
Modified Files:
test_SchemaGeneration.py
Log Message:
Fixed bug #918095: tests/run.py fails if neither psycopg, pgdb or pygresql is installed
Index: test_SchemaGeneration.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/test_SchemaGeneration.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** test_SchemaGeneration.py 14 Feb 2004 18:17:21 -0000 1.6
--- test_SchemaGeneration.py 22 Mar 2004 20:39:03 -0000 1.7
***************
*** 63,66 ****
--- 63,73 ----
modelSet.addModelFromXML({'file': xmlmodelPath})
model=modelSet.modelNamed('simpleModel1')
+ try:
+ import psycopg
+ except ImportError:
+ # fake psycopg, we do not really need it except for successfully
+ # importing the PostgresqlAdaptor
+ import sys
+ sys.modules['psycopg']=1
pgAdaptor=Adaptor.adaptorWithModel(model)
|