~ubuntu-branches/debian/jessie/sqlalchemy/jessie

« back to all changes in this revision

Viewing changes to test/perf/sessions.py

  • Committer: Bazaar Package Importer
  • Author(s): Piotr Ożarowski
  • Date: 2011-08-01 23:18:16 UTC
  • mfrom: (1.4.15 upstream) (16.1.14 experimental)
  • Revision ID: james.westby@ubuntu.com-20110801231816-6lx797pi3q1fpqst
Tags: 0.7.2-1
* New upstream release
* Bump minimum required python-mako version to 0.4.1 (closes: 635898)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
from sqlalchemy import *
2
2
from sqlalchemy.orm import *
3
3
 
4
 
from sqlalchemy.test.compat import gc_collect
5
 
from sqlalchemy.test import TestBase, AssertsExecutionResults, profiling, testing
 
4
from test.lib.compat import gc_collect
 
5
from test.lib import AssertsExecutionResults, profiling, testing
6
6
from test.orm import _fixtures
7
7
 
8
8
# in this test we are specifically looking for time spent in the attributes.InstanceState.__cleanup() method.
9
9
 
10
10
ITERATIONS = 100
11
11
 
12
 
class SessionTest(TestBase, AssertsExecutionResults):
 
12
class SessionTest(fixtures.TestBase, AssertsExecutionResults):
13
13
    @classmethod
14
14
    def setup_class(cls):
15
15
        global t1, t2, metadata,T1, T2
36
36
                l.append({'c2':'this is t2 #%d' % y, 't1id':x})
37
37
            t2.insert().execute(*l)
38
38
 
39
 
        class T1(_fixtures.Base):
 
39
        class T1(fixtures.ComparableEntity):
40
40
            pass
41
 
        class T2(_fixtures.Base):
 
41
        class T2(fixtures.ComparableEntity):
42
42
            pass
43
43
 
44
44
        mapper(T1, t1, properties={