]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
try < 0
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 20 Mar 2010 01:42:35 +0000 (21:42 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 20 Mar 2010 01:42:35 +0000 (21:42 -0400)
lib/sqlalchemy/dialects/mssql/pyodbc.py
test/dialect/test_mssql.py

index 5625e3cd263ecab6b132037adcbc5789ab500291..7f46ec7fb588ab12f766987c99f93818b47f6c79 100644 (file)
@@ -17,7 +17,7 @@ from sqlalchemy import types as sqltypes, util
 import decimal
 
 class _MSNumeric_pyodbc(sqltypes.Numeric):
-    """Turns Decimals with adjusted() < -6 or > 7 into strings.
+    """Turns Decimals with adjusted() < 0 or > 7 into strings.
     
     This is the only method that is proven to work with Pyodbc+MSSQL
     without crashing (floats can be used but seem to cause sporadic
@@ -33,7 +33,7 @@ class _MSNumeric_pyodbc(sqltypes.Numeric):
                     isinstance(value, decimal.Decimal):
                 
                 adjusted = value.adjusted()
-                if adjusted < -6:
+                if adjusted < 0:
                     return self._small_dec_to_string(value)
                 elif adjusted > 7:
                     return self._large_dec_to_string(value)
index c411427b65fcccf08605e975da04cf7fe1880ebe..7a4e4dc4256c5f68d253c0f4ff41d88488521cac 100644 (file)
@@ -764,7 +764,6 @@ class TypesTest(TestBase, AssertsExecutionResults, ComparesTables):
     def teardown(self):
         metadata.drop_all()
     
-    @testing.crashes('mssql+pyodbc', 'FIXME: no clue what is up here.')
     @testing.fails_on_everything_except('mssql+pyodbc', 'this is some pyodbc-specific feature')
     def test_decimal_notation(self):
         import decimal