From 066aed68171b3106c01e5b1f708b036594f32840 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 26 Sep 2022 08:54:59 -0400 Subject: [PATCH] adjust tests for sqlites w/o returning 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 | 4 ++-- test/engine/test_logging.py | 1 + test/orm/test_composites.py | 6 +++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/test/base/test_tutorials.py b/test/base/test_tutorials.py index 6c511f7764..31207c7a51 100644 --- a/test/base/test_tutorials.py +++ b/test/base/test_tutorials.py @@ -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") diff --git a/test/engine/test_logging.py b/test/engine/test_logging.py index b1c4876310..7cf67c220e 100644 --- a/test/engine/test_logging.py +++ b/test/engine/test_logging.py @@ -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. diff --git a/test/orm/test_composites.py b/test/orm/test_composites.py index efa2ecb45e..ddd9a45b8b 100644 --- a/test/orm/test_composites.py +++ b/test/orm/test_composites.py @@ -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) -- 2.47.3