- attached mssql-test1.patch
Unit tests fail for MSSQL/adodbapi
A lot of the unit tests fail for MSSQL with adodbapi. I intend to gradually submit patches until they all pass.
Comments (12)
-
reporter -
reporter The first patch modifies the test scripts to pass auto_identity_insert=True to create_engine. This involved a bit of refactoring of the code, but only touches the test scripts, not SA. With my fix for
#415also applied, all the tests in engine/transaction.py now pass (previously most failed). -
repo owner - changed status to resolved
-
reporter - changed status to open
- removed status
Ok, I have now prepared another patch, which fixes three tests in the engine directory. Now all but one of these pass! The patch makes the following changes:
MSNumeric now supports columns that don't specify precision. MSSQLSchemaGenerator now only creates at most one implicit sequence on a table, as MSSQL only supports a single IDENTITY column. ReflectionTest.testmultipk now only specifies an explicit sequence for a single column. MSSQLDialect.reflecttable now uses the key_column_usage table to reflect foreign keys, so composite keys are supported reliably. It also checks the table schema. ClauseList.compare now compares in an order-insensitive manner.
-
reporter - attached mssql-test2.patch
Patch to fix three test failures in engine
-
reporter And here are a couple of simple fixes to get more of the SQL tests working.
-
reporter - attached mssql-test3.patch
Simple fixes for some SQL tests
-
reporter Looking at Michael's comments on the list:
Oh dear! I seem to have made a bit of a hash of this. Most of your comments relate to patch 1, which has actually already been committed. The other controversial bit was the change to ClauseList.compare. What I've done is roll up patches 2,3 and removed the controversial change. Please can you ignore patches 1,2,3 and consider committing patch 4. When I get a chance, I will submit a patch to fix the changes in patch 1 that you don't like.
Regarding making ClauseList.compare order insensitive, this isn't important to me, I can recode the unit test to fix this another way. My logic is that this clause: a.a = b.a and a.b = b.b is logically identical to: a.b = b.b and a.a = b.a However, the compare function was showing them to be different. Perhaps changing ClauseList.compare like that is too sweeping. Instead, maybe we could change CompoundClause.compare, so that if the operator is commutative (e.g. 'and', 'or') then it does an order insensitive compare.
-
reporter - attached mssql-test4.patch
Patch to consider (please ignore files 1,2,3)
-
reporter Ok, and here is the patch to revert mssql-test1.patch. It also adds the ability to pass the auto_identity_insert parameter in the URL.
-
reporter - attached revert-test1.patch
Patch to revent mssql-test1.patch. Please apply both this and mssql-test4.patch
-
Account Deleted - changed status to resolved
(original author: ram) Committed in rev 2319, thanks
- Log in to comment
First patch