diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-06-10 21:18:24 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-06-10 21:18:24 +0000 |
| commit | 45cec095b4904ba71425d2fe18c143982dd08f43 (patch) | |
| tree | af5e540fdcbf1cb2a3337157d69d4b40be010fa8 /test/aaa_profiling/test_compiler.py | |
| parent | 698a3c1ac665e7cd2ef8d5ad3ebf51b7fe6661f4 (diff) | |
| download | sqlalchemy-45cec095b4904ba71425d2fe18c143982dd08f43.tar.gz | |
- unit tests have been migrated from unittest to nose.
See README.unittests for information on how to run
the tests. [ticket:970]
Diffstat (limited to 'test/aaa_profiling/test_compiler.py')
| -rw-r--r-- | test/aaa_profiling/test_compiler.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/aaa_profiling/test_compiler.py b/test/aaa_profiling/test_compiler.py new file mode 100644 index 000000000..3e4274d47 --- /dev/null +++ b/test/aaa_profiling/test_compiler.py @@ -0,0 +1,30 @@ +from sqlalchemy import * +from sqlalchemy.test import * + + +class CompileTest(TestBase, AssertsExecutionResults): + @classmethod + def setup_class(cls): + global t1, t2, metadata + metadata = MetaData() + t1 = Table('t1', metadata, + Column('c1', Integer, primary_key=True), + Column('c2', String(30))) + + t2 = Table('t2', metadata, + Column('c1', Integer, primary_key=True), + Column('c2', String(30))) + + @profiling.function_call_count(68, {'2.4': 42}) + def test_insert(self): + t1.insert().compile() + + @profiling.function_call_count(68, {'2.4': 45}) + def test_update(self): + t1.update().compile() + + @profiling.function_call_count(185, versions={'2.4':118}) + def test_select(self): + s = select([t1], t1.c.c2==t2.c.c1) + s.compile() + |
