summaryrefslogtreecommitdiff
path: root/test/orm/test_session.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-09-05 12:46:28 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2012-09-05 12:46:28 -0400
commitdf7a3792f558dd5f4e39c7ca1f6feda9753be1f1 (patch)
tree330425f65b908158bd578e80b2d0bae4c84e5b98 /test/orm/test_session.py
parent307c6f9773ad80f3eea32da72b02c8ad50a797e9 (diff)
downloadsqlalchemy-df7a3792f558dd5f4e39c7ca1f6feda9753be1f1.tar.gz
- add req's for predictable gc
Diffstat (limited to 'test/orm/test_session.py')
-rw-r--r--test/orm/test_session.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/orm/test_session.py b/test/orm/test_session.py
index 81188dec9..195cc4250 100644
--- a/test/orm/test_session.py
+++ b/test/orm/test_session.py
@@ -600,8 +600,8 @@ class SessionTest(_fixtures.FixtureTest):
assert user not in s
assert s.query(User).count() == 0
-
- def test_weak_ref(self):
+ @testing.requires.predictable_gc
+ def test_weakref(self):
"""test the weak-referencing identity map, which strongly-
references modified items."""
@@ -636,7 +636,8 @@ class SessionTest(_fixtures.FixtureTest):
assert user.name == 'fred'
assert s.identity_map
- def test_weak_ref_pickled(self):
+ @testing.requires.predictable_gc
+ def test_weakref_pickled(self):
users, User = self.tables.users, pickleable.User
s = create_session()
@@ -689,6 +690,7 @@ class SessionTest(_fixtures.FixtureTest):
sa.orm.attributes.instance_state(u2))
+ @testing.requires.predictable_gc
def test_weakref_with_cycles_o2m(self):
Address, addresses, users, User = (self.classes.Address,
self.tables.addresses,
@@ -722,6 +724,7 @@ class SessionTest(_fixtures.FixtureTest):
user = s.query(User).options(joinedload(User.addresses)).one()
eq_(user, User(name="ed", addresses=[Address(email_address="ed2")]))
+ @testing.requires.predictable_gc
def test_weakref_with_cycles_o2o(self):
Address, addresses, users, User = (self.classes.Address,
self.tables.addresses,