From: Mike Bayer Date: Fri, 21 Apr 2006 16:38:29 +0000 (+0000) Subject: some cleanup X-Git-Tag: rel_0_1_7~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37a0c95f57a055884acf6f03541236bbe27c72c7;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git some cleanup --- diff --git a/test/massload.py b/test/massload.py index d36746968b..43309467ab 100644 --- a/test/massload.py +++ b/test/massload.py @@ -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()