On Aug 21, 2006, at 2:54 PM, Michael Bayer wrote:

> what version of postgres are you running ?

8.1.2

>
> Those two reflection tests are doing something tricky; they create  
> some tables, then under a new MetaData reflect them from the pg  
> system catalog.  then they drop the tables, and try to re-create  
> them using the reflected table information.  in reality, youd never  
> need to do this...but its a very punishing test for CREATE/DROP/ 
> reflection all saying the same thing (which of course, they never  
> really do completely).
>
> your tests are failing at the very end of this process, and it  
> seems like because its tripping up on the sequences specified in  
> the DEFAULT for the column.  those sequences were probably dropped  
> when the tables were dropped (since they get generated as a result  
> of SERIAL), though im not sure why it would care, since they are  
> function arguments, and also if the fact that its using the word  
> "relation" in the error message is significant.  on mine ive never  
> had that problem.
>
> if it is indeed checking for the sequence existing, im not sure  
> what the best way to fix that is, except for just changing the  
> approach of the unit test altogether.
>
>> sql/testtypes.py:
>>   AdaptTest.testadapt() depends on multiple databases (sqlite,  
>> postgres, mysql)
>>
>> sql/select.py
>>   SelectTest.testcast() depends on multiple databases
>>   SelectTest.testtextbinds() depends on multiple databases
>>   SelectTest.testtextbinds() depends on multiple databases
>
> these tests are using the dialects for the corresponding databases,  
> but should not require the actual DBAPI modules to be present (each  
> module in sqlalchemy/databases/ should have its DBAPI imports in a  
> try/except).  do they break on your install ? (as i am on the  
> laptop with everything installed....)

Yes. Here's the output:

======================================================================
ERROR: testadapt (sql.testtypes.AdaptTest)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/Users/dmiller/Code/PyOE/resources/lib/SQLAlchemy/test/sql/ 
testtypes.py", line 43, in testadapt
     e3 = url.URL('sqlite').get_module().dialect()
   File "./lib/sqlalchemy/databases/sqlite.py", line 138, in __init__
     self.supports_cast = (vers(sqlite.sqlite_version) >= vers("3.2.3"))
AttributeError: 'NoneType' object has no attribute 'sqlite_version'

======================================================================
ERROR: testcast (sql.select.SelectTest)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/Users/dmiller/Code/PyOE/resources/lib/SQLAlchemy/test/sql/ 
select.py", line 561, in testcast
     check_results(sqlite.dialect(), ['NUMERIC(10, 2)', 'NUMERIC(12,  
9)', 'DATE', 'TEXT', 'VARCHAR(20)'], '?')
   File "./lib/sqlalchemy/databases/sqlite.py", line 138, in __init__
     self.supports_cast = (vers(sqlite.sqlite_version) >= vers("3.2.3"))
AttributeError: 'NoneType' object has no attribute 'sqlite_version'

======================================================================
ERROR: testtextbinds (sql.select.SelectTest)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/Users/dmiller/Code/PyOE/resources/lib/SQLAlchemy/test/sql/ 
select.py", line 312, in testtextbinds
     dialect = sqlite.dialect()
   File "./lib/sqlalchemy/databases/sqlite.py", line 138, in __init__
     self.supports_cast = (vers(sqlite.sqlite_version) >= vers("3.2.3"))
AttributeError: 'NoneType' object has no attribute 'sqlite_version'




Thanks,

~ Daniel

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to