]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
chore: improve sqlalchemy maintenance path (#13351)
authorlphuc2250gma <lulafletcher262261@outlook.com>
Thu, 11 Jun 2026 21:19:57 +0000 (17:19 -0400)
committerFederico Caselli <cfederico87@gmail.com>
Thu, 11 Jun 2026 21:21:35 +0000 (23:21 +0200)
Co-authored-by: Noa Levi <275430404+lphuc2250gma@users.noreply.github.com>
(cherry picked from commit 41caa189ae948647074d06c5ccc4c292ba20d5f5)

test/orm/test_bind.py

index abd008cadf08859c3582c0321264f6154945c465..d338620d72c3567c58fefd1ec75575a302afeffa 100644 (file)
@@ -496,6 +496,14 @@ class BindIntegrationTest(_fixtures.FixtureTest):
             testing.db,
         )
 
+        assert_raises_message(
+            sa.exc.ArgumentError,
+            "Not an acceptable bind target: foobar",
+            sess.bind_table,
+            "foobar",
+            testing.db,
+        )
+
         self.mapper_registry.map_imperatively(
             self.classes.User, self.tables.users
         )
@@ -509,6 +517,14 @@ class BindIntegrationTest(_fixtures.FixtureTest):
             testing.db,
         )
 
+        assert_raises_message(
+            sa.exc.ArgumentError,
+            "Not an acceptable bind target: User()",
+            sess.bind_table,
+            u_object,
+            testing.db,
+        )
+
     @engines.close_open_connections
     def test_bound_connection(self):
         users, User = self.tables.users, self.classes.User