From 8c17344d1e9bd80815f506391f859278ed6f3e4d Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 1 Mar 2010 17:47:58 +0000 Subject: [PATCH] preload type affinity entries so that these comparisons don't get shoved into the callcounts --- test/aaa_profiling/test_compiler.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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() -- 2.47.3