]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
while working on #5435, I found some misses from the previous PR for #5429 5676/head
authorjonathan vanasco <jonathan@2xlp.com>
Wed, 28 Oct 2020 19:58:55 +0000 (15:58 -0400)
committerjonathan vanasco <jonathan@2xlp.com>
Fri, 30 Oct 2020 15:59:47 +0000 (11:59 -0400)
Change-Id: I0be15f6234c74302734672450a3275add762bdb8

lib/sqlalchemy/sql/util.py
lib/sqlalchemy/testing/suite/test_select.py
test/dialect/mysql/test_query.py

index e4f7532bed7195cb7157115f788f09ccc7311689..1bea9731886cceee3ff9fad1939fdeefe9400013 100644 (file)
@@ -599,14 +599,14 @@ def adapt_criterion_to_null(crit, nulls):
             binary.left = binary.right
             binary.right = Null()
             binary.operator = operators.is_
-            binary.negate = operators.isnot
+            binary.negate = operators.is_not
         elif (
             isinstance(binary.right, BindParameter)
             and binary.right._identifying_key in nulls
         ):
             binary.right = Null()
             binary.operator = operators.is_
-            binary.negate = operators.isnot
+            binary.negate = operators.is_not
 
     return visitors.cloned_traverse(crit, {}, {"binary": visit_binary})
 
index d15fae3c4773a42a0cfc660fe81dbbddb1fb5aa1..954900f67acdbbdd56c7192a909251c2bb8bfc14 100644 (file)
@@ -1367,7 +1367,7 @@ class IsOrIsNotDistinctFromTest(fixtures.TablesTest):
             expected_row_count_for_is,
         )
 
-        expected_row_count_for_isnot = (
+        expected_row_count_for_is_not = (
             1 if expected_row_count_for_is == 0 else 0
         )
         result = connection.execute(
@@ -1375,5 +1375,5 @@ class IsOrIsNotDistinctFromTest(fixtures.TablesTest):
         ).fetchall()
         eq_(
             len(result),
-            expected_row_count_for_isnot,
+            expected_row_count_for_is_not,
         )
index e23ff00d0de31d157984d654d741955980fba6f3..f9d9caf166b9931f0ede1398b49ef2912ab6f026 100644 (file)
@@ -34,7 +34,7 @@ class IdiosyncrasyTest(fixtures.TestBase):
         )
 
         is_(
-            connection.scalar(select(cast(true().isnot(true()), Boolean))),
+            connection.scalar(select(cast(true().is_not(true()), Boolean))),
             False,
         )