]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
repair / modernize binary literal round trip test
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 26 Oct 2025 13:30:54 +0000 (09:30 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 26 Oct 2025 13:43:21 +0000 (09:43 -0400)
update this test to use modern literal round trip
now that execute_compiled is gone

Fixes: #12940
Change-Id: I587dc6845fa8ff078baf3f6e08e54ce6cec84630

test/sql/test_types.py

index 899d2227c184b133e76a9760c630a4479ba8d3d2..c366059b6420d2a31fc7b35af34f6e4f0cdce2fb 100644 (file)
@@ -3112,10 +3112,9 @@ class BinaryTest(fixtures.TablesTest, AssertsExecutionResults):
 
     @testing.requires.binary_literals
     def test_literal_roundtrip(self, connection):
-        compiled = select(cast(literal(util.b("foo")), LargeBinary)).compile(
-            dialect=testing.db.dialect, compile_kwargs={"literal_binds": True}
+        result = connection.execute(
+            select(cast(literal(b"foo", literal_execute=True), LargeBinary))
         )
-        result = connection.exec_driver_sql(compiled.string)
         eq_(result.scalar(), util.b("foo"))
 
     def test_bind_processor_no_dbapi(self):