Python sqlalchemy.testing.profiling._current_test() Examples

The following are code examples for showing how to use sqlalchemy.testing.profiling._current_test(). They are from open source Python projects. You can vote up the examples you like or vote down the ones you don't like.

Example 1
Project: flasky   Author: RoseOu   File: plugin_base.py    MIT License 5 votes vote down vote up
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_ 
Example 2
Project: Flask_Blog   Author: sugarguo   File: plugin_base.py    GNU General Public License v3.0 5 votes vote down vote up
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_ 
Example 3
Project: jbox   Author: jpush   File: plugin_base.py    MIT License 5 votes vote down vote up
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_ 
Example 4
Project: Mahjong-Solitaire   Author: MEASHY   File: plugin_base.py    MIT License 5 votes vote down vote up
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_ 
Example 5
Project: Mahjong-Solitaire   Author: MEASHY   File: plugin_base.py    MIT License 5 votes vote down vote up
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_ 
Example 6
Project: oa_qian   Author: sunqb   File: plugin_base.py    Apache License 2.0 5 votes vote down vote up
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_ 
Example 7
Project: analyzePF   Author: analyzeDFIR   File: plugin_base.py    MIT License 5 votes vote down vote up
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_ 
Example 8
Project: xuemc   Author: skycucumber   File: plugin_base.py    GNU General Public License v2.0 5 votes vote down vote up
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_ 
Example 9
Project: chihu   Author: yelongyu   File: plugin_base.py    GNU General Public License v3.0 5 votes vote down vote up
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_ 
Example 10
Project: url_shortener   Author: martydill   File: plugin_base.py    MIT License 5 votes vote down vote up
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_ 
Example 11
Project: DevFest-MaxBond   Author: aiyyoi   File: plugin_base.py    MIT License 5 votes vote down vote up
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_ 
Example 12
Project: myBlog   Author: adxc   File: plugin_base.py    MIT License 5 votes vote down vote up
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_ 
Example 13
Project: planespotter   Author: yfauser   File: plugin_base.py    MIT License 5 votes vote down vote up
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_ 
Example 14
Project: WRGameVideos-API   Author: thundernet8   File: plugin_base.py    GNU General Public License v2.0 5 votes vote down vote up
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_ 
Example 15
Project: pipa-pay-server   Author: davidvon   File: noseplugin.py    Apache License 2.0 5 votes vote down vote up
def beforeTest(self, test):
        warnings.resetwarnings()
        profiling._current_test = test.id() 
Example 16
Project: Light_control   Author: laurent-colas   File: plugin_base.py    The Unlicense 5 votes vote down vote up
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_ 
Example 17
Project: plataforma-livre-dados-abertos   Author: pbaesse   File: plugin_base.py    GNU General Public License v3.0 5 votes vote down vote up
def before_test(test, test_module_name, test_class, test_name):

    # format looks like:
    # "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_ 
Example 18
Project: Ridr_app   Author: RydrDojo   File: plugin_base.py    MIT License 5 votes vote down vote up
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_ 
Example 19
Project: webapp   Author: superchilli   File: plugin_base.py    MIT License 5 votes vote down vote up
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_ 
Example 20
Project: my_hass_config   Author: ivencooli   File: plugin_base.py    MIT License 5 votes vote down vote up
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_ 
Example 21
Project: Full-Stack-Application-Development   Author: Bolton-and-Menk-GIS   File: plugin_base.py    GNU General Public License v3.0 5 votes vote down vote up
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_ 
Example 22
Project: WRGameVideos-Server   Author: thundernet8   File: plugin_base.py    GNU General Public License v2.0 5 votes vote down vote up
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_