From: Mike Bayer Date: Mon, 26 Sep 2022 12:54:59 +0000 (-0400) Subject: adjust tests for sqlites w/o returning X-Git-Tag: rel_2_0_0b1~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=066aed68171b3106c01e5b1f708b036594f32840;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git 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 --- 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)