]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fixes to get profiling tests working again
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 27 Mar 2014 00:43:20 +0000 (20:43 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 27 Mar 2014 00:43:20 +0000 (20:43 -0400)
lib/sqlalchemy/testing/plugin/pytestplugin.py
lib/sqlalchemy/testing/profiling.py
test/aaa_profiling/test_orm.py

index ceb6963edff8c827559a8f72cc75f2251828dc4d..f38c7ea6a2d16d9312719e43081d5f9e05fb3e0a 100644 (file)
@@ -114,7 +114,13 @@ def pytest_runtest_teardown(item):
 def test_setup(item):
     # like a nose id, e.g.:
     # "test.aaa_profiling.test_compiler.CompileTest.test_update_whereclause"
-    id_ = "%s.%s.%s" % (item.parent.module.__name__, item.parent.cls.__name__, item.name)
+    name = item.parent.cls.__name__
+
+    suffix = "_%s_%s" % (plugin_base.config.db.name, plugin_base.config.db.driver)
+    if name.endswith(suffix):
+        name = name[0:-(len(suffix))]
+
+    id_ = "%s.%s.%s" % (item.parent.module.__name__, name, item.name)
     plugin_base.before_test(item, id_)
 
 def test_teardown(item):
index 021218c3487820bb8d9c537f1c500f7f8cb6affb..2f92527e940bb6f28f2e84989f8dfe81eddbea97 100644 (file)
@@ -111,7 +111,7 @@ class ProfileStatsFile(object):
             # etc.
             self._write()
 
-    @util.memoized_property
+    @property
     def platform_key(self):
 
         dbapi_key = config.db.name + "_" + config.db.driver
index ff55b1c2691721e07e92d9ff8567736b1c2ae651..db756fe8b655f660bf37ef3be61acbafdb457c35 100644 (file)
@@ -10,7 +10,6 @@ from sqlalchemy.testing.schema import Table, Column
 import sys
 
 class MergeTest(fixtures.MappedTest):
-    __backend__ = True
 
     @classmethod
     def define_tables(cls, metadata):
@@ -105,7 +104,6 @@ class LoadManyToOneFromIdentityTest(fixtures.MappedTest):
     to load 1000 related objects from the identity map.
 
     """
-    __backend__ = True
 
 
     @classmethod
@@ -260,7 +258,6 @@ class MergeBackrefsTest(fixtures.MappedTest):
             s.merge(a)
 
 class DeferOptionsTest(fixtures.MappedTest):
-    __backend__ = True
 
     @classmethod
     def define_tables(cls, metadata):
@@ -316,7 +313,6 @@ class DeferOptionsTest(fixtures.MappedTest):
 
 
 class AttributeOverheadTest(fixtures.MappedTest):
-    __backend__ = True
 
     @classmethod
     def define_tables(cls, metadata):