From: Jason Kirtland Date: Tue, 29 Apr 2008 18:28:36 +0000 (+0000) Subject: And a copy.copy() test for the proxy cache. X-Git-Tag: rel_0_5beta1~165 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f035981a6679564f787e55b5cb1b22bc53da6f50;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git And a copy.copy() test for the proxy cache. --- diff --git a/test/ext/associationproxy.py b/test/ext/associationproxy.py index 308bc327dc..e9540fa2db 100644 --- a/test/ext/associationproxy.py +++ b/test/ext/associationproxy.py @@ -863,5 +863,16 @@ class ReconstitutionTest(TestBase): p = session.query(self.Parent).filter_by(name='p1').one() assert set(p.kids) == set(['c1', 'c2']), p.kids + def test_copy(self): + import copy + p = self.Parent('p1') + p.kids.extend(['c1', 'c2']) + p_copy = copy.copy(p) + del p + gc.collect() + + assert set(p_copy.kids) == set(['c1', 'c2']), p.kids + + if __name__ == "__main__": testenv.main()