From 259b256759e2c1d59d2b80d3702215145b7f032f Mon Sep 17 00:00:00 2001 From: Jason Kirtland Date: Wed, 31 Oct 2007 03:17:51 +0000 Subject: [PATCH] - Don't re-save objects in these tests (post r3681) --- test/ext/associationproxy.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/ext/associationproxy.py b/test/ext/associationproxy.py index f602871c2c..71c029e071 100644 --- a/test/ext/associationproxy.py +++ b/test/ext/associationproxy.py @@ -79,7 +79,8 @@ class _CollectionOperations(PersistTest): self.metadata.drop_all() def roundtrip(self, obj): - self.session.save(obj) + if obj not in self.session: + self.session.save(obj) self.session.flush() id, type_ = obj.id, type(obj) self.session.clear() @@ -185,6 +186,7 @@ class _CollectionOperations(PersistTest): after = ['a', 'b', 'O', 'z', 'O', 'z', 'O', 'h', 'O', 'j'] self.assert_(p1.children == after) self.assert_([c.name for c in p1._children] == after) + class DefaultTest(_CollectionOperations): def __init__(self, *args, **kw): @@ -545,7 +547,8 @@ class ScalarTest(PersistTest): session = create_session() def roundtrip(obj): - session.save(obj) + if obj not in session: + session.save(obj) session.flush() id, type_ = obj.id, type(obj) session.clear() -- 2.47.3