diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-12-27 13:45:07 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-12-27 13:45:07 -0500 |
| commit | 819ad89276f223a125d6235aa99acbdc1084c06e (patch) | |
| tree | fd602901170e16527786ddb43de051c7647406fd /lib/sqlalchemy/testing | |
| parent | c24e825c37d9f1f33fa4c1722c945aea26a1fc11 (diff) | |
| download | sqlalchemy-819ad89276f223a125d6235aa99acbdc1084c06e.tar.gz | |
- add an exclusion for "floats to four decimals", backported from 0.9 and applies to
firebird
Diffstat (limited to 'lib/sqlalchemy/testing')
| -rw-r--r-- | lib/sqlalchemy/testing/requirements.py | 9 | ||||
| -rw-r--r-- | lib/sqlalchemy/testing/suite/test_types.py | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/requirements.py b/lib/sqlalchemy/testing/requirements.py index b2c921f89..64bc300e0 100644 --- a/lib/sqlalchemy/testing/requirements.py +++ b/lib/sqlalchemy/testing/requirements.py @@ -393,6 +393,15 @@ class SuiteRequirements(Requirements): return exclusions.closed() @property + def floats_to_four_decimals(self): + """target backend can return a floating-point number with four + significant digits (such as 15.7563) accurately + (i.e. without FP inaccuracies, such as 15.75629997253418). + + """ + return exclusions.open() + + @property def text_type(self): """Target database must support an unbounded Text() " "type such as TEXT or CLOB""" diff --git a/lib/sqlalchemy/testing/suite/test_types.py b/lib/sqlalchemy/testing/suite/test_types.py index 0716b1b91..4733e6666 100644 --- a/lib/sqlalchemy/testing/suite/test_types.py +++ b/lib/sqlalchemy/testing/suite/test_types.py @@ -282,6 +282,7 @@ class NumericTest(fixtures.TestBase): [15.7563, None], ) + @testing.requires.floats_to_four_decimals def test_float_as_decimal(self): self._do_test( Float(precision=8, asdecimal=True), |
