diff options
-rw-r--r-- | doc/build/tutorial/data.rst | 8 | ||||
-rw-r--r-- | test/dialect/test_sqlite.py | 8 | ||||
-rw-r--r-- | test/orm/test_deprecations.py | 2 |
3 files changed, 8 insertions, 10 deletions
diff --git a/doc/build/tutorial/data.rst b/doc/build/tutorial/data.rst index 1b9d946b2..5da8b8667 100644 --- a/doc/build/tutorial/data.rst +++ b/doc/build/tutorial/data.rst @@ -1520,7 +1520,7 @@ number the email addresses of individual users: ... user_table.c.name, ... address_table.c.email_address ... ).select_from(user_table).join(address_table) - >>> with engine.connect() as conn: + >>> with engine.connect() as conn: # doctest:+SKIP ... result = conn.execute(stmt) ... print(result.all()) {opensql}BEGIN (implicit) @@ -1541,7 +1541,7 @@ We also may make use of the ``ORDER BY`` clause using :paramref:`_functions.Func ... func.count().over(order_by=user_table.c.name), ... user_table.c.name, ... address_table.c.email_address).select_from(user_table).join(address_table) - >>> with engine.connect() as conn: + >>> with engine.connect() as conn: # doctest:+SKIP ... result = conn.execute(stmt) ... print(result.all()) {opensql}BEGIN (implicit) @@ -1592,7 +1592,7 @@ using the :meth:`_functions.FunctionElement.filter` method:: ... func.count(address_table.c.email_address).filter(user_table.c.name == 'sandy'), ... func.count(address_table.c.email_address).filter(user_table.c.name == 'spongebob') ... ).select_from(user_table).join(address_table) - >>> with engine.connect() as conn: + >>> with engine.connect() as conn: # doctest:+SKIP ... result = conn.execute(stmt) ... print(result.all()) {opensql}BEGIN (implicit) @@ -1637,7 +1637,7 @@ modern versions of SQLite:: >>> onetwothree = func.json_each('["one", "two", "three"]').table_valued("value") >>> stmt = select(onetwothree).where(onetwothree.c.value.in_(["two", "three"])) - >>> with engine.connect() as conn: + >>> with engine.connect() as conn: # doctest:+SKIP ... result = conn.execute(stmt) ... print(result.all()) {opensql}BEGIN (implicit) diff --git a/test/dialect/test_sqlite.py b/test/dialect/test_sqlite.py index 23ceb88b3..ad169eebf 100644 --- a/test/dialect/test_sqlite.py +++ b/test/dialect/test_sqlite.py @@ -536,17 +536,15 @@ class DefaultsTest(fixtures.TestBase, AssertsCompiledSQL): "t", self.metadata, Column("id", Integer, primary_key=True), - Column("x", DateTime(), server_default=func.now()), + Column("x", String(), server_default=func.lower("UPPERCASE")), ) t.create(testing.db) with testing.db.begin() as conn: - now = conn.scalar(func.now()) - today = datetime.datetime.today() conn.execute(t.insert()) - conn.execute(t.insert().values(x=today)) + conn.execute(t.insert().values(x="foobar")) eq_( conn.execute(select(t.c.x).order_by(t.c.id)).fetchall(), - [(now,), (today,)], + [("uppercase",), ("foobar",)], ) @testing.provide_metadata diff --git a/test/orm/test_deprecations.py b/test/orm/test_deprecations.py index e15bb4674..34e3a4831 100644 --- a/test/orm/test_deprecations.py +++ b/test/orm/test_deprecations.py @@ -3017,7 +3017,7 @@ class NonPrimaryMapperTest(_fixtures.FixtureTest, AssertsCompiledSQL): with testing.expect_deprecated( "The mapper.non_primary parameter is deprecated" ): - mapper( + m = mapper( # noqa F841 User, users, non_primary=True, |