]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
some cleanup
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 21 Apr 2006 16:38:29 +0000 (16:38 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 21 Apr 2006 16:38:29 +0000 (16:38 +0000)
test/massload.py

index d36746968b8d9aae5f4ca746cbca0f735c1b21c7..43309467abb343b77543851fcb51c554968de919 100644 (file)
@@ -35,7 +35,7 @@ class LoadTest(AssertMixin):
         clear_mappers()
         for x in range(1,NUM/500+1):
             l = []
-            for y in range(x*500-500, x*500):
+            for y in range(x*500-499, x*500 + 1):
                 l.append({'item_id':y, 'value':'this is item #%d' % y})
             items.insert().execute(*l)
             
@@ -47,7 +47,7 @@ class LoadTest(AssertMixin):
         for x in range (1,NUM/100):
             # this is not needed with cpython which clears non-circular refs immediately
             #gc.collect()
-            l = m.select(items.c.item_id.between(x*100 - 100, x*100 - 1))
+            l = m.select(items.c.item_id.between(x*100 - 99, x*100 ))
             assert len(l) == 100
             print "loaded ", len(l), " items "
             # modifying each object will insure that the objects get placed in the "dirty" list
@@ -59,7 +59,7 @@ class LoadTest(AssertMixin):
             assert len(attributes.managed_attributes) == len(l)
             print len(objectstore.get_session().dirty)
             print len(objectstore.get_session().identity_map)
-            #objectstore.expunge(*l)
+            objectstore.expunge(*l)
 
 if __name__ == "__main__":
     testbase.main()