]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Add compiler test for NOT
authorjazzthief <mynameisyegor@gmail.com>
Wed, 18 Jan 2023 09:44:40 +0000 (10:44 +0100)
committerjazzthief <mynameisyegor@gmail.com>
Wed, 18 Jan 2023 09:44:40 +0000 (10:44 +0100)
test/sql/test_operators.py

index 305b74f6776cf0d1fc8d2ed6b4d5f98de80ed5b5..f80be34463c57dd7c3ad58401f2bbbb3e60766bf 100644 (file)
@@ -4518,6 +4518,16 @@ class AnyAllTest(fixtures.TestBase, testing.AssertsCompiledSQL):
 
 
 class BitOpTest(fixtures.TestBase, testing.AssertsCompiledSQL):
+    __dialect__ = "default"
+
+    def test_compile_not(self):
+        c = column("c", Integer)
+
+        self.assert_compile(
+            select(operators.bitwise_not_op(c)),
+            "SELECT ~c",
+        )
+
     @testing.combinations(
         ("xor", operators.bitwise_xor_op, "^"),
         ("or", operators.bitwise_or_op, "|"),