MCPcopy Create free account
hub / github.com/PyMySQL/PyMySQL / test_decimal_special_values

Method test_decimal_special_values

pymysql/tests/test_converters.py:94–105  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

92 self.assertEqual(converters.convert_time(raw), raw)
93
94 def test_decimal_special_values(self):
95 values = (
96 Decimal("NaN"),
97 Decimal("sNaN"),
98 Decimal("Infinity"),
99 Decimal("-Infinity"),
100 )
101 for value in values:
102 with self.assertRaisesRegex(
103 ProgrammingError, f"{str(value).lower()} can not be used with MySQL"
104 ):
105 converters.Decimal2Literal(value, None)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected