From: Mike Bayer Date: Thu, 7 Jan 2021 16:01:31 +0000 (-0500) Subject: repair transaction scope in test_nullPKsOK_BtoA for mssql X-Git-Tag: rel_1_4_0b2~64 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6c5de1e3ee5c6f24cc6f6c863acc86c77fa99a1e;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git repair transaction scope in test_nullPKsOK_BtoA for mssql 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 --- diff --git a/test/orm/test_relationships.py b/test/orm/test_relationships.py index 5143d98c5d..5979f08ae6 100644 --- a/test/orm/test_relationships.py +++ b/test/orm/test_relationships.py @@ -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()