]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
And a copy.copy() test for the proxy cache.
authorJason Kirtland <jek@discorporate.us>
Tue, 29 Apr 2008 18:28:36 +0000 (18:28 +0000)
committerJason Kirtland <jek@discorporate.us>
Tue, 29 Apr 2008 18:28:36 +0000 (18:28 +0000)
test/ext/associationproxy.py

index 308bc327dc0b9390f2582a5094fd85eb0321166a..e9540fa2db5c1213e9488bf002e8aca695b185f7 100644 (file)
@@ -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()