]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
adjust tests for sqlites w/o returning
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 26 Sep 2022 12:54:59 +0000 (08:54 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 26 Sep 2022 12:56:24 +0000 (08:56 -0400)
the sqlite builds on github actions seem to be very
inconsistent about versions and many don't support
RETURNING.  ensure any tests that depend on RETURNING present
are marked as such.

Change-Id: I7a60a81fa70b90642448cdd58eda33212c3afebc

test/base/test_tutorials.py
test/engine/test_logging.py
test/orm/test_composites.py

index 6c511f7764da5944efd1cbb18b2313d81bc416bc..31207c7a519fa734b9ab3b505abca7ce36ae0bb6 100644 (file)
@@ -12,8 +12,8 @@ from sqlalchemy.testing import requires
 
 
 class DocTest(fixtures.TestBase):
-    __requires__ = ("python310",)
-    __only_on__ = "sqlite"
+    __requires__ = ("python310", "insert_returning", "insertmanyvalues")
+    __only_on__ = "sqlite+pysqlite"
 
     def _setup_logger(self):
         rootlogger = logging.getLogger("sqlalchemy.engine.Engine")
index b1c4876310a8d5d32e8f26503701e16953c7ed7e..7cf67c220e0ec297bd959c1fea204276e3256143 100644 (file)
@@ -238,6 +238,7 @@ class LogParamsTest(fixtures.TestBase):
             "298, 299], 5]]",
         )
 
+    @testing.requires.insertmanyvalues
     def test_log_insertmanyvalues(self):
         """test the full logging for insertmanyvalues added for #6047.
 
index efa2ecb45eba2c403e78927aa069bce19f88e2d9..ddd9a45b8b3ca2c095eba02b2aa2ab19f5e933fb 100644 (file)
@@ -308,7 +308,11 @@ class PointTest(fixtures.MappedTest, testing.AssertsCompiledSQL):
         eq_(e1.end, Point(17, 8))
 
     @testing.combinations(
-        "legacy", "statement", "values", "stmt_returning", "values_returning"
+        ("legacy",),
+        ("statement",),
+        ("values",),
+        ("stmt_returning", testing.requires.insertmanyvalues),
+        ("values_returning", testing.requires.insert_returning),
     )
     def test_bulk_insert(self, type_):
         Edge, Point = (self.classes.Edge, self.classes.Point)