From: Mike Bayer Date: Mon, 1 Mar 2010 17:47:58 +0000 (+0000) Subject: preload type affinity entries so that these comparisons don't get shoved into the... X-Git-Tag: rel_0_6beta2~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c17344d1e9bd80815f506391f859278ed6f3e4d;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git preload type affinity entries so that these comparisons don't get shoved into the callcounts --- diff --git a/test/aaa_profiling/test_compiler.py b/test/aaa_profiling/test_compiler.py index b5645a2415..e49a3df7fc 100644 --- a/test/aaa_profiling/test_compiler.py +++ b/test/aaa_profiling/test_compiler.py @@ -15,6 +15,16 @@ class CompileTest(TestBase, AssertsExecutionResults): Column('c1', Integer, primary_key=True), Column('c2', String(30))) + # go through all the TypeEngine + # objects in use and pre-load their _type_affinity + # entries. + for t in (t1, t2): + for c in t.c: + c.type._type_affinity + from sqlalchemy import types + for t in types.type_map.values(): + t._type_affinity + @profiling.function_call_count(69, {'2.4': 44, '3.0':77, '3.1':77}) def test_insert(self): t1.insert().compile()