Ejemplo n.º 1
0
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_
Ejemplo n.º 2
0
def after_test(test):
    engines.testing_reaper._after_test_ctx()
    warnings.resetwarnings()
Ejemplo n.º 3
0
def before_test(test, id_):
    warnings.resetwarnings()
    profiling._current_test = id_
Ejemplo n.º 4
0
 def beforeTest(self, test):
     warnings.resetwarnings()
     profiling._current_test = test.id()
Ejemplo n.º 5
0
 def afterTest(self, test):
     engines.testing_reaper._after_test_ctx()
     warnings.resetwarnings()
Ejemplo n.º 6
0
 def beforeTest(self, test):
     warnings.resetwarnings()
     profiling._current_test = test.id()