]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
this test works better with session clears in between
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 8 Oct 2006 02:51:30 +0000 (02:51 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 8 Oct 2006 02:51:30 +0000 (02:51 +0000)
test/orm/mapper.py

index 27c92e437b4894d10d69a5137614189f3e2a498c..fad13b5c0a8eeb9514587aa3a9190ac5ecbf5c74 100644 (file)
@@ -366,6 +366,8 @@ class MapperTest(MapperSuperTest):
             l = usermapper.query(sess).select()
             self.assert_result(l, User, *user_address_result)
         self.assert_sql_count(db, go, 1)
+
+        sess.clear()
         
         # then select just from users.  run it into instances.
         # then assert the data, which will launch 3 more lazy loads
@@ -377,6 +379,8 @@ class MapperTest(MapperSuperTest):
         self.assert_sql_count(db, go, 4)
         
         clear_mappers()
+
+        sess.clear()
         
         # test with a deeper set of eager loads.  when we first load the three
         # users, they will have no addresses or orders.  the number of lazy loads when
@@ -393,6 +397,8 @@ class MapperTest(MapperSuperTest):
                 }), lazy=False)
             })
 
+        sess.clear()
+
         # first test straight eager load, 1 statement
         def go():
             l = usermapper.query(sess).select()