diff options
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/sql/sqltypes.py | 2 | ||||
| -rw-r--r-- | lib/sqlalchemy/testing/suite/test_types.py | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/sqltypes.py b/lib/sqlalchemy/sql/sqltypes.py index 5b53f390e..6838baa5f 100644 --- a/lib/sqlalchemy/sql/sqltypes.py +++ b/lib/sqlalchemy/sql/sqltypes.py @@ -702,6 +702,8 @@ class Float(Numeric): return processors.to_decimal_processor_factory( decimal.Decimal, self._effective_decimal_return_scale) + elif dialect.supports_native_decimal: + return processors.to_float else: return None diff --git a/lib/sqlalchemy/testing/suite/test_types.py b/lib/sqlalchemy/testing/suite/test_types.py index de32e77a4..a345454be 100644 --- a/lib/sqlalchemy/testing/suite/test_types.py +++ b/lib/sqlalchemy/testing/suite/test_types.py @@ -431,7 +431,6 @@ class NumericTest(_LiteralRoundTripFixture, fixtures.TestBase): filter_=lambda n: n is not None and round(n, 5) or None ) - @testing.fails_on("mysql", "until we do #4020") def test_float_coerce_round_trip(self): expr = 15.7563 |
