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)
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
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()