]> 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)
committerGitHub <noreply@github.com>
Thu, 11 Jun 2026 21:19:57 +0000 (23:19 +0200)
Co-authored-by: Noa Levi <275430404+lphuc2250gma@users.noreply.github.com>
test/orm/test_bind.py

index 56e9422e430a627515cf07a43a92d4044937a84d..c90b5fbb1ca62a03cb2e6e2b48e3eea407b56986 100644 (file)
@@ -502,6 +502,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
         )
@@ -515,6 +523,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