本文整理汇总了Python中sqlalchemy.testing.profiling._current_test方法的典型用法代码示例。如果您正苦于以下问题:Python profiling._current_test方法的具体用法?Python profiling._current_test怎么用?Python profiling._current_test使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sqlalchemy.testing.profiling
的用法示例。
在下文中一共展示了profiling._current_test方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: before_test
# 需要导入模块: from sqlalchemy.testing import profiling [as 别名]
# 或者: from sqlalchemy.testing.profiling import _current_test [as 别名]
def before_test(test, test_module_name, test_class, test_name):
# like a nose id, e.g.:
# "test.aaa_profiling.test_compiler.CompileTest.test_update_whereclause"
name = test_class.__name__
suffix = "_%s_%s" % (config.db.name, config.db.driver)
if name.endswith(suffix):
name = name[0:-(len(suffix))]
id_ = "%s.%s.%s" % (test_module_name, name, test_name)
profiling._current_test = id_
示例2: before_test
# 需要导入模块: from sqlalchemy.testing import profiling [as 别名]
# 或者: from sqlalchemy.testing.profiling import _current_test [as 别名]
def before_test(test, test_module_name, test_class, test_name):
# like a nose id, e.g.:
# "test.aaa_profiling.test_compiler.CompileTest.test_update_whereclause"
name = getattr(test_class, '_sa_orig_cls_name', test_class.__name__)
id_ = "%s.%s.%s" % (test_module_name, name, test_name)
profiling._current_test = id_
示例3: before_test
# 需要导入模块: from sqlalchemy.testing import profiling [as 别名]
# 或者: from sqlalchemy.testing.profiling import _current_test [as 别名]
def before_test(test, test_module_name, test_class, test_name):
# like a nose id, e.g.:
# "tests.aaa_profiling.test_compiler.CompileTest.test_update_whereclause"
name = test_class.__name__
suffix = "_%s_%s" % (config.db.name, config.db.driver)
if name.endswith(suffix):
name = name[0:-(len(suffix))]
id_ = "%s.%s.%s" % (test_module_name, name, test_name)
warnings.resetwarnings()
profiling._current_test = id_
示例4: before_test
# 需要导入模块: from sqlalchemy.testing import profiling [as 别名]
# 或者: from sqlalchemy.testing.profiling import _current_test [as 别名]
def before_test(test, test_module_name, test_class, test_name):
# like a nose id, e.g.:
# "test.aaa_profiling.test_compiler.CompileTest.test_update_whereclause"
name = test_class.__name__
suffix = "_%s_%s" % (config.db.name, config.db.driver)
if name.endswith(suffix):
name = name[0:-(len(suffix))]
id_ = "%s.%s.%s" % (test_module_name, name, test_name)
warnings.resetwarnings()
profiling._current_test = id_