summaryrefslogtreecommitdiff
path: root/test/requirements.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2017-09-01 00:11:10 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2017-09-11 14:17:10 -0400
commit31f80b9eaeb3c3435b7f6679b41e434478b1d11c (patch)
tree9802d4470d78768ba2a8812b47fae0f91e689d5c /test/requirements.py
parent4c97ea116c3686cb03f566f16b0a0e9a9fd33968 (diff)
downloadsqlalchemy-oracle_numeric.tar.gz
Refactor for cx_Oracle version 6oracle_numeric
Drops support for cx_Oracle prior to version 5.x, reworks numeric and binary support. Fixes: #4064 Change-Id: Ib9ae9aba430c15cd2a6eeb4e5e3fd8e97b5fe480
Diffstat (limited to 'test/requirements.py')
-rw-r--r--test/requirements.py48
1 files changed, 34 insertions, 14 deletions
diff --git a/test/requirements.py b/test/requirements.py
index 9b01a22dd..0829607cd 100644
--- a/test/requirements.py
+++ b/test/requirements.py
@@ -750,10 +750,14 @@ class DefaultRequirements(SuiteRequirements):
"""target backend supports Decimal() objects using E notation
to represent very large values."""
- return skip_if(
- [("sybase+pyodbc", None, None,
- "Don't know how do get these values through FreeTDS + Sybase"),
- ("firebird", None, None, "Precision must be from 1 to 18")])
+ return fails_if(
+ [
+ ("sybase+pyodbc", None, None,
+ "Don't know how do get these values through FreeTDS + Sybase"
+ ),
+ ("firebird", None, None, "Precision must be from 1 to 18")
+ ]
+ )
@property
def precision_numerics_many_significant_digits(self):
@@ -761,15 +765,17 @@ class DefaultRequirements(SuiteRequirements):
such as 319438950232418390.273596, 87673.594069654243
"""
- def cx_oracle_6_config(config):
- return config.db.driver == "cx_oracle" and \
- config.db.dialect.cx_oracle_ver >= (6, )
+
+ def broken_cx_oracle(config):
+ return against(config, 'oracle+cx_oracle') and \
+ config.db.dialect.cx_oracle_ver <= (6, 0, 2) and \
+ config.db.dialect.cx_oracle_ver > (6, )
return fails_if(
- [cx_oracle_6_config,
- ('sqlite', None, None, 'TODO'),
- ("firebird", None, None, "Precision must be from 1 to 18"),
- ("sybase+pysybase", None, None, "TODO"),
+ [
+ ('sqlite', None, None, 'TODO'),
+ ("firebird", None, None, "Precision must be from 1 to 18"),
+ ("sybase+pysybase", None, None, "TODO"),
]
)
@@ -781,9 +787,7 @@ class DefaultRequirements(SuiteRequirements):
return fails_if(
[
- ('oracle', None, None,
- "this may be a bug due to the difficulty in handling "
- "oracle precision numerics"),
+ ("oracle", None, None, "driver doesn't do this automatically"),
("firebird", None, None,
"database and/or driver truncates decimal places.")
]
@@ -999,3 +1003,19 @@ class DefaultRequirements(SuiteRequirements):
lambda config: against(config, 'postgresql') and
config.db.scalar("show server_encoding").lower() == "utf8"
)
+
+ @property
+ def broken_cx_oracle6_numerics(config):
+ return exclusions.LambdaPredicate(
+ lambda config: against(config, 'oracle+cx_oracle') and
+ config.db.dialect.cx_oracle_ver <= (6, 0, 2) and
+ config.db.dialect.cx_oracle_ver > (6, ),
+ "cx_Oracle github issue #77"
+ )
+
+ @property
+ def oracle5x(self):
+ return only_if(
+ lambda config: against(config, "oracle+cx_oracle") and
+ config.db.dialect.cx_oracle_ver < (6, )
+ ) \ No newline at end of file