"""
return exclusions.open()
+ @property
+ def literal_float_coercion(self):
+ """target backend will return the exact float value 15.7563
+ with only four significant digits from this statement:
+
+ SELECT :param
+
+ where :param is the Python float 15.7563
+
+ i.e. it does not return 15.75629997253418
+
+ """
+ return exclusions.open()
+
@property
def floats_to_four_decimals(self):
"""target backend can return a floating-point number with four
filter_=lambda n: n is not None and round(n, 5) or None,
)
+ @testing.requires.literal_float_coercion
def test_float_coerce_round_trip(self, connection):
expr = 15.7563
("integer", None),
("float", 28.5),
("float", None),
- (
- "float",
- 1234567.89,
- ),
+ ("float", 1234567.89, testing.requires.literal_float_coercion),
("numeric", 1234567.89),
# this one "works" because the float value you see here is
# lost immediately to floating point stuff
# fixed in mysql-connector as of 2.0.1,
# see https://bugs.mysql.com/bug.php?id=73266
+
+ @testing.requires.literal_float_coercion
def test_precision_float_roundtrip(self, metadata, connection):
t = Table(
"t",
"sqlite doesn't return Decimal objects without special handlers",
)
+ @property
+ def literal_float_coercion(self):
+ return skip_if("+asyncmy")
+
@property
def infinity_floats(self):
return fails_on_everything_except(