From f035981a6679564f787e55b5cb1b22bc53da6f50 Mon Sep 17 00:00:00 2001 From: Jason Kirtland Date: Tue, 29 Apr 2008 18:28:36 +0000 Subject: [PATCH] And a copy.copy() test for the proxy cache. --- test/ext/associationproxy.py | 11 +++++++++++ 1 file changed, 11 insertions(+) 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() -- 2.47.3