]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
block json tests for non-json backends
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 3 Dec 2025 04:18:58 +0000 (23:18 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 3 Dec 2025 04:18:58 +0000 (23:18 -0500)
these were failing on Oracle which has no json type

Change-Id: I3c35c4f38c581378c74ee9dc3fb7a71655c5ee9c

test/sql/test_tstrings_py314.py

index e3d8cb37bc0d16af09ac67ceeb86c3845dfc3e3d..a3e617796f158d85a090e43d88adc2a8cd39c74e 100644 (file)
@@ -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"}