From: Mike Bayer Date: Wed, 3 Dec 2025 04:18:58 +0000 (-0500) Subject: block json tests for non-json backends X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a9e82a6abe8824614d959e693885728cad2a8d07;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git block json tests for non-json backends these were failing on Oracle which has no json type Change-Id: I3c35c4f38c581378c74ee9dc3fb7a71655c5ee9c --- diff --git a/test/sql/test_tstrings_py314.py b/test/sql/test_tstrings_py314.py index e3d8cb37bc..a3e617796f 100644 --- a/test/sql/test_tstrings_py314.py +++ b/test/sql/test_tstrings_py314.py @@ -9,6 +9,7 @@ from sqlalchemy import JSON from sqlalchemy import literal from sqlalchemy import select from sqlalchemy import String +from sqlalchemy import testing from sqlalchemy import tstring from sqlalchemy.engine.interfaces import CacheStats from sqlalchemy.sql import table @@ -260,6 +261,7 @@ class ExecutionTest(fixtures.TestBase): result = connection.execute(tstring(t"select {a + 7}, {b}")) eq_(result.all(), [(8, 2)]) + @testing.requires.json_type def test_json_literal_execution(self, connection): some_json = {"foo": "bar"} stmt = tstring(t"select {literal(some_json, JSON)}").columns( @@ -269,6 +271,7 @@ class ExecutionTest(fixtures.TestBase): row = result.scalar() eq_(row, {"foo": "bar"}) + @testing.requires.json_type def test_statement_caching(self, connection): """Test that tstring statements are properly cached.""" some_json = {"foo": "bar"}