[sqlalchemy] Re: SQLAlchemy test suite - no success/failure exit code

2007-03-17 Thread skip . montanaro



Michael go into python and type:

Michael from pysqlite2 import dbapi2
Michael dbapi2.sqlite_version

Well, that failed:

$ /tmp/python-buildbot/local/bin/python
Python 2.6a0 (trunk:54421, Mar 17 2007, 11:17:17) 
[GCC 4.0.0 (Apple Computer, Inc. build 5026)] on darwin
Type help, copyright, credits or license for more information.
 from pysqlite2 import dbapi2
Traceback (most recent call last):
  File stdin, line 1, in module
ImportError: No module named pysqlite2

but pysqlite3 is there:

$ /tmp/python-buildbot/local/bin/python
Python 2.6a0 (trunk:54421, Mar 17 2007, 11:17:17) 
[GCC 4.0.0 (Apple Computer, Inc. build 5026)] on darwin
Type help, copyright, credits or license for more information.
 from pysqlite3 import dbapi2
Traceback (most recent call last):
  File stdin, line 1, in module
ImportError: No module named pysqlite3
 from sqlite3 import dbapi2
 dbapi2.sqlite_version
'3.1.3'

Does that help?  Forgive me, I really have no idea how much of sqlite comes
with Python (is it just pysqlite?) or what it uses if there is another
version installed on the machine.

Skip

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SQLAlchemy test suite - no success/failure exit code

2007-03-17 Thread Michael Bayer

yes 3.1.3 is a fairly old version (from February 2005), the unit  
tests are assuming at least version 3.2.3 of sqlite.  but youre best  
off with the very latest 3.3.13.

On Mar 17, 2007, at 4:25 PM, [EMAIL PROTECTED] wrote:




 Michael go into python and type:

 Michael from pysqlite2 import dbapi2
 Michael dbapi2.sqlite_version

 Well, that failed:

 $ /tmp/python-buildbot/local/bin/python
 Python 2.6a0 (trunk:54421, Mar 17 2007, 11:17:17)
 [GCC 4.0.0 (Apple Computer, Inc. build 5026)] on darwin
 Type help, copyright, credits or license for more  
 information.
 from pysqlite2 import dbapi2
 Traceback (most recent call last):
   File stdin, line 1, in module
 ImportError: No module named pysqlite2

 but pysqlite3 is there:

 $ /tmp/python-buildbot/local/bin/python
 Python 2.6a0 (trunk:54421, Mar 17 2007, 11:17:17)
 [GCC 4.0.0 (Apple Computer, Inc. build 5026)] on darwin
 Type help, copyright, credits or license for more  
 information.
 from pysqlite3 import dbapi2
 Traceback (most recent call last):
   File stdin, line 1, in module
 ImportError: No module named pysqlite3
 from sqlite3 import dbapi2
 dbapi2.sqlite_version
 '3.1.3'

 Does that help?  Forgive me, I really have no idea how much of  
 sqlite comes
 with Python (is it just pysqlite?) or what it uses if there is another
 version installed on the machine.

 Skip

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SQLAlchemy test suite - no success/failure exit code

2007-03-16 Thread Michael Bayer

all tests pass on Mac OSX with the latest sqlite (as well as  
postgres, mysql).

solaris, not so sure, ill have  a look later.

On Mar 16, 2007, at 1:19 PM, [EMAIL PROTECTED] wrote:



 Michael OK this was something small, the alltests.py scripts  
 needed
 Michael to call testbase's main() function and not its runTests()
 Michael method, so that the exit code is propigated.  rev 2414.

 skip Excellent.  Trying a test run now...

 The good news is the test failures are now properly reported.  The  
 bad news
 is there are test failures.  I'm going to try and get things set up  
 to test
 on the Solaris systems at work, but it would help if people could  
 take a
 peek at the test logs:

 http://www.python.org/dev/buildbot/community/all/g5%20OSX% 
 20trunk/builds/37/step-SQLAlchemy/0
 http://www.python.org/dev/buildbot/community/all/g5%20OSX%202.5/ 
 builds/16/step-SQLAlchemy/0

 and let me know if any of those are expected.  It would also help  
 if someone
 using SA on Mac OSX could run the tests to see what (if anything)  
 fails.

 Thx,

 -- 
 Skip Montanaro - [EMAIL PROTECTED] - http://www.webfast.com/~skip/
 The hippies and the hipsters did some great stuff in the sixties,
 but the geeks pulled their weight too. -- Billy Bragg

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SQLAlchemy test suite - no success/failure exit code

2007-03-16 Thread Michael Bayer

I just ran my python 2.5 install (its a framework install) on OSX  
against the test suite on r2418, which uses the built-in sqlite3, and  
i got all tests passed.

On Mar 16, 2007, at 1:19 PM, [EMAIL PROTECTED] wrote:



 Michael OK this was something small, the alltests.py scripts  
 needed
 Michael to call testbase's main() function and not its runTests()
 Michael method, so that the exit code is propigated.  rev 2414.

 skip Excellent.  Trying a test run now...

 The good news is the test failures are now properly reported.  The  
 bad news
 is there are test failures.  I'm going to try and get things set up  
 to test
 on the Solaris systems at work, but it would help if people could  
 take a
 peek at the test logs:

 http://www.python.org/dev/buildbot/community/all/g5%20OSX% 
 20trunk/builds/37/step-SQLAlchemy/0
 http://www.python.org/dev/buildbot/community/all/g5%20OSX%202.5/ 
 builds/16/step-SQLAlchemy/0

 and let me know if any of those are expected.  It would also help  
 if someone
 using SA on Mac OSX could run the tests to see what (if anything)  
 fails.

 Thx,

 -- 
 Skip Montanaro - [EMAIL PROTECTED] - http://www.webfast.com/~skip/
 The hippies and the hipsters did some great stuff in the sixties,
 but the geeks pulled their weight too. -- Billy Bragg

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SQLAlchemy test suite - no success/failure exit code

2007-03-16 Thread Michael Bayer

geez, what version of sqlite / pysqlite / python is running there ?   
tons of those errors ive never seen before.


On Mar 16, 2007, at 1:19 PM, [EMAIL PROTECTED] wrote:



 Michael OK this was something small, the alltests.py scripts  
 needed
 Michael to call testbase's main() function and not its runTests()
 Michael method, so that the exit code is propigated.  rev 2414.

 skip Excellent.  Trying a test run now...

 The good news is the test failures are now properly reported.  The  
 bad news
 is there are test failures.  I'm going to try and get things set up  
 to test
 on the Solaris systems at work, but it would help if people could  
 take a
 peek at the test logs:

 http://www.python.org/dev/buildbot/community/all/g5%20OSX% 
 20trunk/builds/37/step-SQLAlchemy/0
 http://www.python.org/dev/buildbot/community/all/g5%20OSX%202.5/ 
 builds/16/step-SQLAlchemy/0

 and let me know if any of those are expected.  It would also help  
 if someone
 using SA on Mac OSX could run the tests to see what (if anything)  
 fails.

 Thx,

 -- 
 Skip Montanaro - [EMAIL PROTECTED] - http://www.webfast.com/~skip/
 The hippies and the hipsters did some great stuff in the sixties,
 but the geeks pulled their weight too. -- Billy Bragg

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SQLAlchemy test suite - no success/failure exit code

2007-03-16 Thread Michael Bayer

ah, in fact one failure youre having, the testcast failure, is  
indicative of running against a very old sqlite.

FAIL: testcast (sql.select.SelectTest)
--
Traceback (most recent call last):
   File /private/tmp/sqlalchemy/test/sql/select.py, line 737, in  
testcast
 check_results(sqlite.dialect(), ['NUMERIC(10, 2)', 'NUMERIC(12,  
9)', 'DATE', 'TEXT', 'VARCHAR(20)'], '?')
   File /private/tmp/sqlalchemy/test/sql/select.py, line 723, in  
check_results
 self.assertEqual(str(cast(tbl.c.v1, Numeric).compile 
(dialect=dialect)), 'CAST(casttest.v1 AS %s)' %expected_results[0])
AssertionError: 'casttest.v1' != 'CAST(casttest.v1 AS NUMERIC(10, 2))'

the CAST isnt happening for the sqlite dialect.  this only occurs if  
this logic takes place:

 self.supports_cast = (sqlite is not None and vers 
(sqlite.sqlite_version) = vers(3.2.3))

if youre running py2.5 it should be using the sqlite3 thats included,  
which on my install is 3.3.5.  otherwise you should run 3.3.13  
since there was an order by bug in 3.3.12 and a few previous versions.

On Mar 16, 2007, at 1:19 PM, [EMAIL PROTECTED] wrote:



 Michael OK this was something small, the alltests.py scripts  
 needed
 Michael to call testbase's main() function and not its runTests()
 Michael method, so that the exit code is propigated.  rev 2414.

 skip Excellent.  Trying a test run now...

 The good news is the test failures are now properly reported.  The  
 bad news
 is there are test failures.  I'm going to try and get things set up  
 to test
 on the Solaris systems at work, but it would help if people could  
 take a
 peek at the test logs:

 http://www.python.org/dev/buildbot/community/all/g5%20OSX% 
 20trunk/builds/37/step-SQLAlchemy/0
 http://www.python.org/dev/buildbot/community/all/g5%20OSX%202.5/ 
 builds/16/step-SQLAlchemy/0

 and let me know if any of those are expected.  It would also help  
 if someone
 using SA on Mac OSX could run the tests to see what (if anything)  
 fails.

 Thx,

 -- 
 Skip Montanaro - [EMAIL PROTECTED] - http://www.webfast.com/~skip/
 The hippies and the hipsters did some great stuff in the sixties,
 but the geeks pulled their weight too. -- Billy Bragg

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SQLAlchemy test suite - no success/failure exit code

2007-03-16 Thread skip . montanaro


Michael all tests pass on Mac OSX with the latest sqlite (as well as
Michael postgres, mysql).

Hmmm...  Then I wonder what's different about the buildbot setup and a
normal interactive run.

Michael solaris, not so sure, ill have  a look later.

There's no particular need.  I was just hoping to get a different data point
to compare my buildbot results with.  You provided that with your Mac OSX
results.

Skip

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SQLAlchemy test suite - no success/failure exit code

2007-03-16 Thread skip . montanaro


Michael geez, what version of sqlite / pysqlite / python is running
Michael there ?  tons of those errors ive never seen before.

That will have to wait for me to get home.  Probably not until tomorrow at
the earliest.  I'll let you know what I figure out.  Perhaps I can tweak the
buildslave script to emit the relevant version information.

Skip

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SQLAlchemy test suite - no success/failure exit code

2007-03-16 Thread skip . montanaro


Michael ah, in fact one failure youre having, the testcast failure,
Michael is indicative of running against a very old sqlite.

Can you tell me what version I'm using other than very old?  Here's what I
see:

$ otool -L lib-dynload/_sqlite3.so
lib-dynload/_sqlite3.so:
/usr/lib/libsqlite3.0.dylib (compatibility version 9.0.0, current 
version 9.6.0)
/usr/lib/libmx.A.dylib (compatibility version 1.0.0, current 
version 93.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current 
version 88.1.8)

and the stuff in /usr/lib looks fairly new:

$ ls -Ll libsqlite3.*
-rwxr-xr-x   1 root  wheel  284508 Mar 14 20:04 libsqlite3.0.8.6.dylib
-rwxr-xr-x   1 root  wheel  284508 Mar 14 20:04 libsqlite3.0.dylib
-rwxr-xr-x   1 root  wheel  284508 Mar 14 20:04 libsqlite3.dylib

I suppose it's possible that I'm picking up another version.  I have an old
version of Darwin Ports on the machine and Python comes with sqlite of some
version.

Skip

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SQLAlchemy test suite - no success/failure exit code

2007-03-16 Thread Michael Bayer

go into python and type:

from pysqlite2 import dbapi2
dbapi2.sqlite_version


On Mar 16, 2007, at 3:23 PM, [EMAIL PROTECTED] wrote:



 Michael ah, in fact one failure youre having, the testcast  
 failure,
 Michael is indicative of running against a very old sqlite.

 Can you tell me what version I'm using other than very old?   
 Here's what I
 see:

 $ otool -L lib-dynload/_sqlite3.so
 lib-dynload/_sqlite3.so:
 /usr/lib/libsqlite3.0.dylib (compatibility version  
 9.0.0, current version 9.6.0)
 /usr/lib/libmx.A.dylib (compatibility version 1.0.0,  
 current version 93.0.0)
 /usr/lib/libSystem.B.dylib (compatibility version  
 1.0.0, current version 88.1.8)

 and the stuff in /usr/lib looks fairly new:

 $ ls -Ll libsqlite3.*
 -rwxr-xr-x   1 root  wheel  284508 Mar 14 20:04  
 libsqlite3.0.8.6.dylib
 -rwxr-xr-x   1 root  wheel  284508 Mar 14 20:04 libsqlite3.0.dylib
 -rwxr-xr-x   1 root  wheel  284508 Mar 14 20:04 libsqlite3.dylib

 I suppose it's possible that I'm picking up another version.  I  
 have an old
 version of Darwin Ports on the machine and Python comes with sqlite  
 of some
 version.

 Skip

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SQLAlchemy test suite - no success/failure exit code

2007-03-15 Thread Michael Bayer

there is a sys.exit() that I added at Grig's request at the end of  
testbase.py; its testbase.py's main() method that runs the actual  
tests in all cases.   the result code is determined by unittest's  
result.wasSuccessful().  it was working when i first implemented it,  
maybe you can help track down why its not returning.


On Mar 14, 2007, at 10:30 PM, [EMAIL PROTECTED] wrote:


 Some of you may know that I run a Python buildbot for SQLAlchemy:

 http://www.python.org/dev/buildbot/community/all/?show=g5%20OSX% 
 20trunkshow=g5%20OSX%202.5

 It always shows build successful even though there are plenty of  
 actual
 test failures on my Mac.  After letting it languish for a long time  
 I dug
 into the problem a bit this evening.  It seems that SQLAlchemy's  
 test script
 (test/alltests.py) doesn't exit with any indication of success or  
 failure.
 Consequently, it appears to always succeed.

 I'm not much of a unittest module person, but it appears the
 unittest.TextTestRunner class is a fundamental barrier to extracting a
 useful error code from the tests.  Its run() method doesn't seem to  
 return
 anything useful, at least nothing that's documented.  I suppose the  
 simplest
 hack would be to temporarily replace sys.stderr with a StringIO  
 object when
 running the test, rummage around in it looking for failures=NN,  
 errors=MM,
 restore sys.stderr, dump the output, then exit with NN+MM.  I could  
 also
 replace test/alltests.py with something of my own invention but I'd  
 prefer
 to rely as much as possible on the test setup presented by the SQA
 distribution.

 Skip

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SQLAlchemy test suite - no success/failure exit code

2007-03-15 Thread Michael Bayer

OK this was something small, the alltests.py scripts needed to call  
testbase's main() function and not its runTests() method, so that the  
exit code is propigated.  rev 2414.

On Mar 14, 2007, at 10:30 PM, [EMAIL PROTECTED] wrote:


 Some of you may know that I run a Python buildbot for SQLAlchemy:

 http://www.python.org/dev/buildbot/community/all/?show=g5%20OSX% 
 20trunkshow=g5%20OSX%202.5

 It always shows build successful even though there are plenty of  
 actual
 test failures on my Mac.  After letting it languish for a long time  
 I dug
 into the problem a bit this evening.  It seems that SQLAlchemy's  
 test script
 (test/alltests.py) doesn't exit with any indication of success or  
 failure.
 Consequently, it appears to always succeed.

 I'm not much of a unittest module person, but it appears the
 unittest.TextTestRunner class is a fundamental barrier to extracting a
 useful error code from the tests.  Its run() method doesn't seem to  
 return
 anything useful, at least nothing that's documented.  I suppose the  
 simplest
 hack would be to temporarily replace sys.stderr with a StringIO  
 object when
 running the test, rummage around in it looking for failures=NN,  
 errors=MM,
 restore sys.stderr, dump the output, then exit with NN+MM.  I could  
 also
 replace test/alltests.py with something of my own invention but I'd  
 prefer
 to rely as much as possible on the test setup presented by the SQA
 distribution.

 Skip

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SQLAlchemy test suite - no success/failure exit code

2007-03-15 Thread skip . montanaro


Michael OK this was something small, the alltests.py scripts needed
Michael to call testbase's main() function and not its runTests()
Michael method, so that the exit code is propigated.  rev 2414.

Excellent.  Trying a test run now...

Skip

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---