]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- fix bug here in profiling.py
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 28 Aug 2013 14:19:11 +0000 (10:19 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 28 Aug 2013 14:19:11 +0000 (10:19 -0400)
- callcount

lib/sqlalchemy/testing/profiling.py
test/profiles.txt

index 2e0a5babcdabf8aa944ddf5d4e0e9ddda4b266b8..4f6ea3f9098ee200a04df92d7a9bdd603743bd68 100644 (file)
@@ -274,17 +274,17 @@ def function_call_count(variance=0.05):
                 deviance = int(callcount * variance)
                 failed = abs(callcount - expected_count) > deviance
 
-            if failed:
-                if _profile_stats.write:
-                    _profile_stats.replace(callcount)
-                else:
-                    raise AssertionError(
-                        "Adjusted function call count %s not within %s%% "
-                        "of expected %s. Rerun with --write-profiles to "
-                        "regenerate this callcount."
-                        % (
-                        callcount, (variance * 100),
-                        expected_count))
+                if failed:
+                    if _profile_stats.write:
+                        _profile_stats.replace(callcount)
+                    else:
+                        raise AssertionError(
+                            "Adjusted function call count %s not within %s%% "
+                            "of expected %s. Rerun with --write-profiles to "
+                            "regenerate this callcount."
+                            % (
+                            callcount, (variance * 100),
+                            expected_count))
             return fn_result
         return update_wrapper(wrap, fn)
     return decorate
index fc13bedc10417e0af060173fb146964049d0d450..9b6cf5aa5279244ff5fe42f72249a113db982dd2 100644 (file)
@@ -391,7 +391,7 @@ test.aaa_profiling.test_zoomark.ZooMarkTest.test_profile_5_aggregates 3.3_postgr
 
 # TEST: test.aaa_profiling.test_zoomark.ZooMarkTest.test_profile_6_editing
 
-test.aaa_profiling.test_zoomark.ZooMarkTest.test_profile_6_editing 2.7_postgresql_psycopg2_cextensions 1811
+test.aaa_profiling.test_zoomark.ZooMarkTest.test_profile_6_editing 2.7_postgresql_psycopg2_cextensions 1905
 test.aaa_profiling.test_zoomark.ZooMarkTest.test_profile_6_editing 2.7_postgresql_psycopg2_nocextensions 1858
 test.aaa_profiling.test_zoomark.ZooMarkTest.test_profile_6_editing 3.2_postgresql_psycopg2_nocextensions 1731
 test.aaa_profiling.test_zoomark.ZooMarkTest.test_profile_6_editing 3.3_postgresql_psycopg2_cextensions 1846