summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-11-13 13:19:36 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2010-11-13 13:19:36 -0500
commitaf4285e6adf2a052ce985f9d3d97cc89778fca96 (patch)
tree56364c556828d5c7e103e57a82ef82e41d603fb9 /test
parent5400ea2c1e2c605843255f5eb15b5ce1d8fba025 (diff)
downloadsqlalchemy-af4285e6adf2a052ce985f9d3d97cc89778fca96.tar.gz
- move inline "import" statements to use new "util.importlater()" construct. cuts
down on clutter, timeit says there's a teeny performance gain, at least where the access is compared against attr.subattr. these aren't super-critical calls anyway - slight inlining in _class_to_mapper
Diffstat (limited to 'test')
-rw-r--r--test/aaa_profiling/test_compiler.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/aaa_profiling/test_compiler.py b/test/aaa_profiling/test_compiler.py
index a7f64410b..bc589c0b2 100644
--- a/test/aaa_profiling/test_compiler.py
+++ b/test/aaa_profiling/test_compiler.py
@@ -5,6 +5,7 @@ from sqlalchemy.test import *
class CompileTest(TestBase, AssertsExecutionResults):
@classmethod
def setup_class(cls):
+
global t1, t2, metadata
metadata = MetaData()
t1 = Table('t1', metadata,
@@ -15,6 +16,10 @@ class CompileTest(TestBase, AssertsExecutionResults):
Column('c1', Integer, primary_key=True),
Column('c2', String(30)))
+ # do a "compile" ahead of time to load
+ # deferred imports
+ t1.insert().compile()
+
# go through all the TypeEngine
# objects in use and pre-load their _type_affinity
# entries.