summaryrefslogtreecommitdiff
path: root/test/sql
diff options
context:
space:
mode:
authorsanjana <sanjana0796@gmail.com>2019-02-13 10:17:46 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2019-02-13 17:29:13 -0500
commit12dad561a77506fe262d791d3135babc0be50e66 (patch)
treec60ca8c1edab121ae45455bb10338909595a90b0 /test/sql
parent5cc5234e0b065907deb2765249dde1c526fe5c89 (diff)
downloadsqlalchemy-12dad561a77506fe262d791d3135babc0be50e66.tar.gz
Adding setter to should_evaluate_none property
Fixed issue where the :class:`.JSON` type had a read-only :attr:`.JSON.should_evaluate_none` attribute, which would cause failures when making use of the :meth:`.TypeEngine.evaluates_none` method in conjunction with this type. Pull request courtesy Sanjana S. Fixes: #4485 Closes: #4496 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4496 Pull-request-sha: 044beb23982d411be6fe640716b1b693df0f7189 Change-Id: I1f3e1d7dec9d2ceb6ccaaa8cac158a062cf02710
Diffstat (limited to 'test/sql')
-rw-r--r--test/sql/test_types.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/sql/test_types.py b/test/sql/test_types.py
index dc75e1b14..a1b1f024b 100644
--- a/test/sql/test_types.py
+++ b/test/sql/test_types.py
@@ -249,6 +249,8 @@ class AdaptTest(fixtures.TestBase):
or t1.__dict__[k] is None
)
+ eq_(t1.evaluates_none().should_evaluate_none, True)
+
def test_python_type(self):
eq_(types.Integer().python_type, int)
eq_(types.Numeric().python_type, decimal.Decimal)