]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
repair transaction scope in test_nullPKsOK_BtoA for mssql
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 7 Jan 2021 16:01:31 +0000 (11:01 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 7 Jan 2021 16:01:31 +0000 (11:01 -0500)
In the bound metadata removal we also mixed use of
connection/engine in this test which is causing a hang
on SQL Server.

Change-Id: Ibbee06654d0d549968db5e0bf9daa5bef27cdbe1

test/orm/test_relationships.py

index 5143d98c5dd568db003326ab36e9a26714805c01..5979f08ae61c2a2d5e4bb0502a3289bb56bf0530 100644 (file)
@@ -1655,7 +1655,7 @@ class FKsAsPksTest(fixtures.MappedTest):
         c1 = C()
         c1.id = 5
         c1.a = None
-        with fixture_session() as sess:
+        with Session(connection) as sess:
             sess.add(c1)
             # test that no error is raised.
             sess.flush()