diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-05-09 12:42:19 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-05-09 12:42:19 -0400 |
| commit | 17306220498cea779f360d03eeb5aadac3ccb59f (patch) | |
| tree | 659e6fc6fc7ec58c9e5ce20e5ac45d1616c8b290 | |
| parent | f8bb1c102258c321769edaa3daaa3eb73a135877 (diff) | |
| download | sqlalchemy-17306220498cea779f360d03eeb5aadac3ccb59f.tar.gz | |
reset session on new #6449 test for pypy
Change-Id: If1c8c755a7e9c0191c1666a13b9e920effbeb5bc
| -rw-r--r-- | test/orm/test_expire.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/orm/test_expire.py b/test/orm/test_expire.py index 4ef585f27..0e356fe78 100644 --- a/test/orm/test_expire.py +++ b/test/orm/test_expire.py @@ -772,7 +772,12 @@ class ExpireTest(_fixtures.FixtureTest): # contains_eager().contains_eager() worked as expected asserter.assert_(CountStatements(1)) + # expire object, reset the session fully and re-add so that + # the related User / Order objects are not in the identity map, + # allows SQL count below to be deterministic sess.expire(a1) + sess.close() + sess.add(a1) # assert behavior on unexpire with self.sql_execution_asserter(testing.db) as asserter: |
