Hi, I wrote a little patch for mysql.py that add a MSTime type, but before submitting anything, I'd like the unittest to run run successfully. The problem is that the tests (especially the DateTest) fail with mssql before I touch anything in the code (cf details at the end of the message).
Is there any special condition for the unittests to run on mssql ? Regards, Christophe Here is the command I run : #> PYTHONPATH=./test python test/sql/testtypes.py DateTest --dburi=mssql://tester:[EMAIL PROTECTED]/sf_tmp And I got : testdate (__main__.DateTest) ... FAIL testdate2 (__main__.DateTest) ... ERROR testtextdate (__main__.DateTest) ... ERROR ====================================================================== ERROR: testdate (__main__.DateTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cdevienne/prog/sqlalchemy_trunk/test/testbase.py", line 398, in __call__ self._initTest.setUpAll() File "test/sql/testtypes.py", line 324, in setUpAll users_with_date.insert().execute(**idict) # insert the data File "/home/cdevienne/prog/sqlalchemy_trunk/lib/sqlalchemy/sql.py", line 1207, in execute return self.compile(bind=self.bind, parameters=compile_params).execute(*multiparams, **params) File "/home/cdevienne/prog/sqlalchemy_trunk/lib/sqlalchemy/sql.py", line 1097, in execute return e.execute_compiled(self, *multiparams, **params) File "/home/cdevienne/prog/sqlalchemy_trunk/lib/sqlalchemy/engine/base.py", line 780, in execute_compiled return connection.execute_compiled(compiled, *multiparams, **params) File "/home/cdevienne/prog/sqlalchemy_trunk/lib/sqlalchemy/engine/base.py", line 568, in execute_compiled self._execute_raw(context) File "/home/cdevienne/prog/sqlalchemy_trunk/lib/sqlalchemy/engine/base.py", line 581, in _execute_raw self._execute(context) File "/home/cdevienne/prog/sqlalchemy_trunk/lib/sqlalchemy/engine/base.py", line 599, in _execute raise exceptions.SQLError(context.statement, context.parameters, e) SQLError: (DatabaseError) internal error: None (None) 'INSERT INTO query_users_with_date (user_id, user_name, user_datetime, user_date) VALUES (%(user_id)s, %(user_name)s, %(user_datetime)s, %(user_date)s)' {'user_id': 7, 'user_name': 'jack', 'user_datetime': datetime.datetime(2005, 11, 10, 0, 0), 'user_date': datetime.datetime(2005, 11, 10, 0, 0)} ====================================================================== ERROR: testdate2 (__main__.DateTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "test/sql/testtypes.py", line 351, in testdate2 t.insert().execute(adate=d1, adatetime=d1) File "/home/cdevienne/prog/sqlalchemy_trunk/lib/sqlalchemy/sql.py", line 1207, in execute return self.compile(bind=self.bind, parameters=compile_params).execute(*multiparams, **params) File "/home/cdevienne/prog/sqlalchemy_trunk/lib/sqlalchemy/sql.py", line 1097, in execute return e.execute_compiled(self, *multiparams, **params) File "/home/cdevienne/prog/sqlalchemy_trunk/lib/sqlalchemy/engine/base.py", line 780, in execute_compiled return connection.execute_compiled(compiled, *multiparams, **params) File "/home/cdevienne/prog/sqlalchemy_trunk/lib/sqlalchemy/engine/base.py", line 568, in execute_compiled self._execute_raw(context) File "/home/cdevienne/prog/sqlalchemy_trunk/lib/sqlalchemy/engine/base.py", line 581, in _execute_raw self._execute(context) File "/home/cdevienne/prog/sqlalchemy_trunk/lib/sqlalchemy/engine/base.py", line 599, in _execute raise exceptions.SQLError(context.statement, context.parameters, e) SQLError: (DatabaseError) internal error: None (None) 'INSERT INTO testdate (adate, adatetime) VALUES (%(adate)s, %(adatetime)s)' {'adate': datetime.date(2007, 10, 30), 'adatetime': datetime.date(2007, 10, 30)} ====================================================================== ERROR: testtextdate (__main__.DateTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "test/sql/testtypes.py", line 340, in testtextdate self.assert_(isinstance(x[0][0], datetime.datetime)) IndexError: list index out of range ====================================================================== FAIL: testdate (__main__.DateTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "test/sql/testtypes.py", line 333, in testdate self.assert_(l == insert_data, 'DateTest mismatch: got:%s expected:%s' % (l, insert_data)) AssertionError: DateTest mismatch: got:[] expected:[[7, 'jack', datetime.datetime(2005, 11, 10, 0, 0), datetime.datetime(2005, 11, 10, 0, 0)], [8, 'roy', datetime.datetime(2005, 11, 10, 11, 52, 35), datetime.datetime(2006, 5, 10, 15, 32, 47)], [9, 'foo', datetime.datetime(2005, 11, 10, 11, 52, 35), datetime.datetime(2004, 9, 18, 4, 0, 52)], [10, 'colber', None, None]] ---------------------------------------------------------------------- Ran 3 tests in 0.048s FAILED (failures=1, errors=3) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---