From 0f49157bc990ff5364a672d914639ff4c6d74021 Mon Sep 17 00:00:00 2001 From: Jason Kirtland Date: Sat, 13 Oct 2007 22:18:35 +0000 Subject: [PATCH] Adjusted zoomark ranges for 2.4 and 2.5. --- test/profiling/zoomark.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/test/profiling/zoomark.py b/test/profiling/zoomark.py index 4feab2fc84..4d73e92b6e 100644 --- a/test/profiling/zoomark.py +++ b/test/profiling/zoomark.py @@ -13,6 +13,12 @@ from sqlalchemy import * class ZooMarkTest(testing.AssertMixin): + """Runs the ZooMark and squawks if method counts vary from the norm. + + Each test has an associated `call_range`, the total number of accepted + function calls made during the test. The count can vary between Python + 2.4 and 2.5. + """ @testing.supported('postgres') @profiling.profiled('create', call_range=(1610, 2000), always=True) @@ -44,7 +50,7 @@ class ZooMarkTest(testing.AssertMixin): metadata.create_all() @testing.supported('postgres') - @profiling.profiled('populate', call_range=(4340, 4400), always=True) + @profiling.profiled('populate', call_range=(3580, 4400), always=True) def test_1a_populate(self): Zoo = metadata.tables['Zoo'] Animal = metadata.tables['Animal'] @@ -112,7 +118,7 @@ class ZooMarkTest(testing.AssertMixin): MotherID=bai_yun) @testing.supported('postgres') - @profiling.profiled('insert', call_range=(230, 250), always=True) + @profiling.profiled('insert', call_range=(195, 250), always=True) def test_2_insert(self): Animal = metadata.tables['Animal'] i = Animal.insert() @@ -120,7 +126,7 @@ class ZooMarkTest(testing.AssertMixin): tick = i.execute(Species='Tick', Name='Tick %d' % x, Legs=8) @testing.supported('postgres') - @profiling.profiled('properties', call_range=(3420, 3430), always=True) + @profiling.profiled('properties', call_range=(3080, 3430), always=True) def test_3_properties(self): Zoo = metadata.tables['Zoo'] Animal = metadata.tables['Animal'] @@ -143,7 +149,7 @@ class ZooMarkTest(testing.AssertMixin): ticks = fullobject(Animal.select(Animal.c.Species=='Tick')) @testing.supported('postgres') - @profiling.profiled('expressions', call_range=(12570, 12580), always=True) + @profiling.profiled('expressions', call_range=(11600, 13200), always=True) def test_4_expressions(self): Zoo = metadata.tables['Zoo'] Animal = metadata.tables['Animal'] @@ -197,7 +203,7 @@ class ZooMarkTest(testing.AssertMixin): assert len(fulltable(Animal.select(func.date_part('day', Animal.c.LastEscape) == 21))) == 1 @testing.supported('postgres') - @profiling.profiled('aggregates', call_range=(1220, 1230), always=True) + @profiling.profiled('aggregates', call_range=(1050, 1270), always=True) def test_5_aggregates(self): Animal = metadata.tables['Animal'] Zoo = metadata.tables['Zoo'] @@ -239,7 +245,7 @@ class ZooMarkTest(testing.AssertMixin): legs.sort() @testing.supported('postgres') - @profiling.profiled('editing', call_range=(1370, 1380), always=True) + @profiling.profiled('editing', call_range=(1330, 1390), always=True) def test_6_editing(self): Zoo = metadata.tables['Zoo'] @@ -268,7 +274,7 @@ class ZooMarkTest(testing.AssertMixin): assert SDZ['Founded'] == datetime.date(1935, 9, 13) @testing.supported('postgres') - @profiling.profiled('multiview', call_range=(3080, 3090), always=True) + @profiling.profiled('multiview', call_range=(2870, 3155), always=True) def test_7_multiview(self): Zoo = metadata.tables['Zoo'] Animal = metadata.tables['Animal'] -- 2.47.3